R Flashcards

1
Q

r: To assign a var, type

A

myVar – 10

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

r: To write the value TRUE, type

A

TRUE or T

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

r: To sum a group of numbers, type

A

sum(1,2,3)

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

r: To repeat a string, type

A

rep(“string”, times = 3)

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

r: To return tre square root of a number, type

A

sqrt(10)

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

r: To list all of the files in the current directory from within R, type

A

list.files()

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

r: To run an R script from within R, type

A

source(“script.R”)

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