library()
search()
List of all packages currently active on your computer
install.packages(“< lib_name >”)
library(“< lib_name >”)
library(help = “< lib_name >”)
package documentation listed in editor
update.packages ()
detach(“ package:< lib_name> “, unload=TRUE)
Task
Clear the console
comments
run single command from script
index number
print(“string”)
assignment operator
display variable value
type variable name in editor and execute
concatenate vectors
c(x,y) = x values, y values
multiple vectors subtraction
performs operation on values of same index
vector multiplication
y * 3 = each value in y vector x 3
table commands
dim(table_name)
summary(table_name)
head(table_name)
prints first 6 rows of table
names(table_name)
prints column headers / names
table( table_name $ column_name )
pie(table(table name $ table column)
pie(table(iris$Species ), col= purple”,”red”,”green”
assigns pie chart colors to each iris species in same order species are listed