Data manipulation with R Flashcards
1
Q
Modes of objects
A
numeric, character, and logical
2
Q
scan() the characters
A
scan(what=” “)
Notes: By default, scan expects all of its input to be numeric data; this can be overridden with the what= argument
3
Q
Example: scan will output a list with as many elements as there are data types provided
A
names = scan(what=list(a=0,b=”“,c=0))
4
Q
One possible drawback with read.table
A
Automatically convert character variables to factors. To remove this feature, use
options(stringsAsFactors = FALSE)