Data Expressions in R

Data Expressions

The following list defines data expressions in R that are used to compute basic numerical results for scalars, vectors, and rectangular data objects.  Scroll through the table to see all functions:

abs()Absolute valuen/a
approx()Linear interpolation of pointsn/a
asin(); acos(); atan()Inverse trigonometric functionsn/a
asinh(); acosh(); atanh()Inverse hyperbolic functionsn/a
ceiling()Round up to nearest integerImpacts stored precision
colmeans(); colsums(); colvar(); colstds()Summary stats by columnn/a
cor()Returns the correlation matrix of a data matrixn/a
cumprod()Cumulative productby column
cumsum()Cumulative sumby column
diff()Element-by-element subtraction(n+1) - n by column; diff(x, lag = 2)
factorial()Compute n!n/a
floor()Rounds down to the nearest integerImpacts stored precision
gamma(); lgamma(); digamma()Gamma function and its natural loggamma(x) = (x-1)!
kurtosis()Kurtosis of a vectorn/a
log()Natural logarithm base en/a
log10()Common log base 10log10(x) == log(x, base = 10)
max(); mean(); min(); median()Distribution summary statisticsn/a
prod()Product of all the elementsn/a
range()Minimum and maximumn/a
rev()Sort in reverse or descending ordern/a
round()Rounds to the specified number of digitsdefault = 0; round(x, digits = 3)
rowmeans(); rowsums(); rowvar(); rowstds()Summary statistics by rown/a
scale()Centers data to have mean zero and unit variancen/a
skewness()Skewness of a vectorn/a
signif()Rounds to the specified number of significant digitsn/a
sin(); cos(); tan()Trigonometric functionsRadians
sinh(); cosh(); tanh()Hyperbolic functionsn/a
sqrt()Square rootn/a
sd()Standard deviationn/a
sum()Sum of all valuesn/a
summary()Min, max, 1st and 3rd quartiles, mean and mediann/a
union()Union of setsn/a
trunk()Returns the integer part of any elementn/a
var()Variance of a vector or the variance/covariance of a matrixn/a

Back | Next

Leave a Reply