R Functions Flashcards

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()

A

adds

24
Q

sqrt()

A

square root

25
Q

%%

A

remainder

26
Q

mean()

A

mean

27
Q

min()

A

minimum

28
Q

max()

A

maximum

29
Q

median()

A

median

30
Q

var()

A

variance

31
Q

sd()

A

standard deviation

32
Q

quantile()

A

sample quantiles based on probabilities

33
Q

prod()

A

returns product

34
Q

round()

A

rounds numbers based on decimal point

35
Q

setwd()

A

sets working directory

36
Q

getwd()

A

outputs working directory

37
Q

list.files()

A

finds files based on path

38
Q

set.seed()

A

number to initiate the pseudorandom number generator

39
Q

sample()

A

sample from a vector

40
Q

for(xinY){}

A

for loop to cycle through commands

41
Q

if(x==TRUE){}

A

if (x) is TRUE then do whatever is inside brackets

42
Q

else{}

A

if whatever inside if statement is FALSE then do …

43
Q

dev.new()

A

opens a new window

44
Q

dev.off()

A

shuts off connection to file

45
Q

plot()

A

plots your data

46
Q

points()

A

adds points to plot

47
Q

legend()

A

adds a legend

48
Q

par()

A

changes parameters

49
Q

pdf()

A

creates a pdf of Plot

50
Q

stripchart()

A

gives stripchart of raw data

51
Q

hist()

A

histogram

52
Q

boxplot()

A

boxplot

53
Q

mtext()

A

adds text to margins

54
Q

abline()

A

y=mx+b

55
Q

layout()

A

sets up a figure canvas up to 4 panels