Math Flashcards
sin,cos,tan,asin,acos,atan,atan2,log,log10,exp max(x) min(x) sum(x) mean(x) median(x) rank(x) var(x) sd(x) cor(x) var(x, y) cor(x, y)
simple math functions
range(x)
id. then c(min(x), max(x))
diff(x)
lagged and iterated differences of vector x
prod(x)
product of the elements of x
quantile(x,probs=)
sample quantiles corresponding to the given prob-
abilities (defaults to 0,.25,.5,.75,1)
weighted.mean(x, w)
mean of x with weights w
round(x, n)
round(x, n)
log(x, base)
computes the logarithm of x with base base
scale(x)
if x is a matrix, centers and reduces the data; to center only use
the option center=FALSE, to reduce only scale=FALSE (by default
center=TRUE, scale=TRUE)
pmin(x,y,…)
a vector which ith element is the minimum of x[i],
y[i], . . .
pmax(x,y,…)
d. for the maximum
cumsum(x)
a vector which ith element is the sum from x[1] to x[i]
cumprod(x)
d. for the product
cummin(x)
id. for the minimum
cummax(x)
d. for the maximum