Data manipulation with R Flashcards

1
Q

Modes of objects

A

numeric, character, and logical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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))

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

One possible drawback with read.table

A

Automatically convert character variables to factors. To remove this feature, use
options(stringsAsFactors = FALSE)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly