?
?command gives help on the given command, e.g. ?names
dim
dim(d) gives the number of rows and columns in dnames
column names in dhead
,tail
the top/bottom N rows of dsummary
A summary of the columns in dnrow
,ncol
the number of rows/columns in d
length
length(x) gives the number of items in xmean
,var
,sd
,median
the mean/variance/stdev/median of the values in x
d[rows, columns]
Select given row(s) and column(s)d$column
,d[[column]]
Select given column
table
table(x) gives the frequency of items in x; table(x,y) crosstabulates x and yplot
plot(x, y) gives a scatter plot of x. Use plot(x, y, type='l') to get a line plotbarplot
barplot(x) gives a barplot of the values in xhist
hist(x) gives a histogram of x, automatically binning the itemslines
lines(x, y) adds a new line to an existing plot
install.packages
"Install the given packages. (Can also be done interactively in the packages tab in Rstudio)"library
Load a given package that is already installedsource
Run a file (or URL) containing R commandsdownload.file
Download a file from the Internet
rnorm
Generate numbers from a normal distributionpnorm
Proportion ofqqnorm
,qqline
Plot the Q-Q scatter and normal line of a distribution