stats coding midterm Flashcards
Obtain documentation for a given
R command
help()
View some examples on the use of a command
example()
Enter data manually to a vector in
R
c(), scan()
Make arithmetic progression vector
seq()
Make vector of repeated values
rep()
Load (often into a data.frame) built-in dataset
data()
View dataset in a spreadsheet-type format
View()
Display internal structure of an R object
str()
Load into a data.frame an existing data file
read.csv(), read.table()
Make available an R add-on package
library(), require()
See dimensions (# of rows/cols) of data.frame
dim()
Give length of a vector
length()
Lists memory contents
ls()
Removes an item from memory
rm()
Lists names of variables in a data.frame
names()
Command for producing a histogram
hist()
Lattice command for producing a histogram
histogram()
List all values of a variable with frequencies
table()
Make a stem plot
stem()
Cross-tabulation tables using formulas
xtabs()
Make a mosaic plot
mosaicplot()
Groups values of a variable into larger bins
cut()
Identify “center” of distribution
mean(), median()