Glossary of R Functions Ben Kite, Paul Johnson 05/15/2018 .libPaths(): Show folders where R packages are installed Sys.info(): Display what R understands about your operating system abline(): Generate a straight line that spans the plot abs(): absolute value arrows(): add arrows to a plot as.character(): convert a vector to character values as.expression(): treat argument as an R experession axis(): add an axis to a plot bdraw(): convenience function to create empty graphs, used in plotting demos bgroup(): Used for combining mathematical markup expressions with data box(): add a boundary box to a plot's display bquote(): a way to combine text strings and output into an R expression (see plotmath) c(): Concatenate (or column vector) cos(): cosine cumsum(): cumulative sum curve(): draw a curve. Creates a plot device data.frame(): Create a data frame dev.new(): create a new on-screen plot device. Not compatible with RStudio dev.off(): usually used to close output files created from graphics dir.create(): Create a directory dir.exists(): Check if directory exists dlogis(): density of a logistic distribution dnorm(): density of a normal distribution draw.ellipse(): function in plotrix to draw an ellipse exp(): exponential values in the input, as in exp(x) expression(): Treat argument as an R expression, not as char string file.exists(): Returns true if a file exists file.symlink(): Create a symbolic link for(): Used to create loops frac(): Used in plotmath to create fractions function(): Creates functions getwd(): Check the current working directory gray.colors(): Creates a simple color palate of gray group(): Used in plotmath to create comma-separated text hat(): Used in plotmath to indicate estimated values help(): Review help content, help("lm") same as ?lm hist(): Generate a Histogram if(): An if logical operator ifelse(): Used for recoding. If input 1 is TRUE, item 2; else 3. install.packages(): retrieve package from CRAN and install installed.packages(): check list of installed packages invlogit(): inverse of the logit transformation italic(): To use italic text in plotmath legend(): Add a legend to a plot length(): Check the number of items in a vector library(): Interact with the package collection lines(): add lines to a plot list(): Create an R list object log(): logarithm, defaults to natural log ls(): list items in workspace mapply(): Apply a function to several matched input columns max(): maximum, don't forget na.rm=TRUE mean(): Find the mean median(): median, don't forget na.rm=TRUE mtext(): write margin text into a plot next(): Inside a for loop, this stops processsing of current case options(): See or set values of the user session, such as number of digits displayed in output. par(): Set or query graphical parameters paste(): Combine character values into a longer string. Is vectorized, works with vectors paste(x, y). paste0(): Combine character strings, but with no space between items pdf(): Create output file "device" that subsequent plot commands will draw into pdf.options(): Used in beginning of script to set defaults phantom(): In plotmath, inserts small blank space plot(): Generate a plot png(): Creates a png output file pnorm(): Cumulative density of normal distribution points(): Add points to a plot polygon(): Add a polygon to a plot print(): display an object's contents ps.options(): Set defaults for postscript output rainbow(): A color pallette rbinom(): Simulate values from a binomial distribution rect(): Draw a rectangle on a plot rep(): Repeat first thing, a given number of times rev(): reverses a vector rgamma(): Simulate values from a gamma distribution rm(): delete objects from the workspace rnorm(): Generate a normal distribution with mean 0 and variance 1 round(): Rounds floating points to integers rug(): Draws "rug" values on X axis in scatterplots sapply(): Run lapply, simplify the result. seq(): Create a sequence of values sessionInfo(): Print version information about R set.seed(): Initialize the internal random number generator sin(): sine sort(): order a vector from small to large sqrt(): Calculate the square root substitute(): R programming method to replace symbolic values (advanced) sum(): The sum of a vector svg(): Create an output device in the SVG format. text(): Add text to the plot region title(): Add a title on the top of a plot (same as main= "" in plot command) unique(): List all unique values in a vector update.packages(): Check CRAN for updates and install them, after asking permission var(): calculate variance which(): Which elements in a vector are TRUE windows(): In MS Windows, used to create a graphic display device (a "window")