R Functions Flashcards
1
Q
!
A
NOT
2
Q
c()
A
Combine
3
Q
length()
A
Tells length
4
Q
head()
A
first six lines
5
Q
tail()
A
last few lines
6
Q
names()
A
returns column names
7
Q
rownames()
A
returns row names
8
Q
colnames()
A
returns column
9
Q
dim()
A
returns dimensions
10
Q
sort()
A
sorts vector in ascending or descending order
11
Q
nrow()
A
counts the number of rows
12
Q
%in%
A
which A are in B (gives TRUE or FALSE)
13
Q
-
A
excludes variable
14
Q
unique()
A
gives unique values
15
Q
str()
A
gives the structure
16
Q
system()
A
run basic commands
17
Q
summary()
A
returns summary
18
Q
rep()
A
replicate of values
19
Q
~
A
“as a function of”
20
Q
seq()
A
sequence
21
Q
installed.packages()
A
already installed paackages
22
Q
install.packages
A
install packages in ‘’