Advanced Data Processing Flashcards Preview

R > Advanced Data Processing > Flashcards

Flashcards in Advanced Data Processing Deck (10)
Loading flashcards...
0

apply(X,INDEX,FUN=)

a vector or array or list of values obtained by applying a function FUN to margins (INDEX) of X

2

lapply(X,FUN)

apply FUN to each element of the list X

3

tapply(X,INDEX,FUN=)

apply FUN to each cell of a ragged array given
by X with indexes INDEX

4

by(data,INDEX,FUN)

apply FUN to data frame data subsetted by INDEX

5

merge(a,b)

merge two data frames by common columns or row names

6

xtabs(a b,data=x)

a contingency table from cross-classifying factors

7

aggregate(x,by,FUN)

splits the data frame x into subsets, computes
summary statistics for each, and returns the result in a convenient form; by is a list of grouping elements, each as long as the variables in x

8

stack(x, ...)

transform data available as separate columns in a data frame or list into a single column

9

unstack(x, ...)

inverse of stack()

10

reshape(x, ...)

reshapes a data frame between ’wide’ format with
repeated measurements in separate columns of the same record and ’long’ format with the repeated measurements in separate records; use (direction=”wide”) or (direction=”long”)