R Functions Flashcards

(55 cards)

1
Q

!

A

NOT

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

c()

A

Combine

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

length()

A

Tells length

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

head()

A

first six lines

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

tail()

A

last few lines

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

names()

A

returns column names

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

rownames()

A

returns row names

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

colnames()

A

returns column

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

dim()

A

returns dimensions

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

sort()

A

sorts vector in ascending or descending order

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

nrow()

A

counts the number of rows

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

%in%

A

which A are in B (gives TRUE or FALSE)

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

-

A

excludes variable

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

unique()

A

gives unique values

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

str()

A

gives the structure

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

system()

A

run basic commands

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

summary()

A

returns summary

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

rep()

A

replicate of values

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

~

A

“as a function of”

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

seq()

A

sequence

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

installed.packages()

A

already installed paackages

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

install.packages

A

install packages in ‘’

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

sum()

24
Q

sqrt()

25
%%
remainder
26
mean()
mean
27
min()
minimum
28
max()
maximum
29
median()
median
30
var()
variance
31
sd()
standard deviation
32
quantile()
sample quantiles based on probabilities
33
prod()
returns product
34
round()
rounds numbers based on decimal point
35
setwd()
sets working directory
36
getwd()
outputs working directory
37
list.files()
finds files based on path
38
set.seed()
number to initiate the pseudorandom number generator
39
sample()
sample from a vector
40
for(xinY){}
for loop to cycle through commands
41
if(x==TRUE){}
if (x) is TRUE then do whatever is inside brackets
42
else{}
if whatever inside if statement is FALSE then do ...
43
dev.new()
opens a new window
44
dev.off()
shuts off connection to file
45
plot()
plots your data
46
points()
adds points to plot
47
legend()
adds a legend
48
par()
changes parameters
49
pdf()
creates a pdf of Plot
50
stripchart()
gives stripchart of raw data
51
hist()
histogram
52
boxplot()
boxplot
53
mtext()
adds text to margins
54
abline()
y=mx+b
55
layout()
sets up a figure canvas up to 4 panels