Glossary of R Functions Ben Kite, Paul Johnson 05/17/2018 NROW(): Ask for number of "rows" in matrix or vector abline(): Add stright line to a plot, many interfaces allowed abline(): Generate a straight line that spans the plot aggregate(): Splits a data.frame into sections, summarizes each apply(): For matrix input, calculate a value for each row or column as.data.frame(): Coerce an object into a data.frame as.list(): Coerce an object into a list object as.numeric(): Converts a vector to floating point, can create NAs assign(): Set an object into the R environment with indicated name attr(): Set or retrive attributes attributes(): Print out attributes browseURL(): Open web browser on indicated file/website c(): Concatenate (or column vector) cbind(): Combine columns coef(): Retrieve coefficients from an object cohen.ES(): Effect size estimate colMeans(): Calculate means of matrix columns. Efficiently. cor(): Calculate correlation cov2cor(): Convert covariance to correlation matrix data.frame(): Create a data frame diag(): Create a diagonal matrix or extract the diagonal from a matrix diff(): Lagged differences dir.create(): Create a directory in the OS dir.exists(): Check if directory exists dnorm(): density of a normal distribution do.call(): Run a function using a list of arguments expand.grid(): Create "mix and match" of all possible values file.exists(): Check if file exists file.symlink(): Create a symbolic link (not on Windows) for(): An iterator formula(): Convert character string to R formula object function(): Creates functions head(): Show first elements of an object help(): Review help content, help("lm") same as ?lm hist(): Generate a Histogram ifelse(): Used for recoding. If input 1 is TRUE, item 2; else 3. lapply(): Apply a function to each element in a list lazyCor(): rockchalk package function, create correlation matrix lazyCov(): rockchalk: covariance matrix legend(): insert a legend into a plot library(): Interact with the package collection lines(): add lines to a plot list(): Create an R list object lm(): Linear model: regression matrix(): Create a 2-D array of values mean(): Find the mean mvrnorm(): In MASS, Create multivariate normal data names(): Retrieve the names of items in a list numeric(): Create numberic vector options(): set or retrieve session options par(): set or retrieve standard graphics parameters paste(): Combine strings, assumes spaces are needed paste0(): Combine strings without spaces pdf.options(): Settings for pdf devices in remainder of session plot(): Generate a plot plotSlopes(): rockchalk function: regression plotter pwr.r.test(): pwr function for quick power analysis qnorm(): Quantiles values from a normal distribution range(): retrieve the low and high values from vector rbind(): Stack together vectors as rows in a matrix rbinom(): Simulate values from a binomial distribution rep(): Repeat first thing, a given number of times require(): Loads a package, almost same as library() rnorm(): Generate a normal distribution with mean 0 and variance 1 round(): Rounds floating points to integers sapply(): Run lapply, simplify the result. sd(): Calculate standard deviation. Don't forget na.rm=TRUE seq(): Create a sequence of values sessionInfo(): Report on R version and packages in use set.seed(): Initialize the internal random number generator sqrt(): Calculate the square root str(): Describe an R object strsplit(): Split a string, creates a list of split items sum(): Add up elements summary(): R generic to display basic, overall view t.test(): A basic t.test numeric vectors table(): Create a tabulation of a discrete variable unlist(): Remove the list "wrapping" structure vapply(): An iterator to simplify returned values, simplar sapply