Advanced Data Processing Flashcards

1
Q

apply(X,INDEX,FUN=)

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

lapply(X,FUN)

A

apply FUN to each element of the list X

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

tapply(X,INDEX,FUN=)

A

apply FUN to each cell of a ragged array given

by X with indexes INDEX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

by(data,INDEX,FUN)

A

apply FUN to data frame data subsetted by INDEX

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

merge(a,b)

A

merge two data frames by common columns or row names

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

xtabs(a b,data=x)

A

a contingency table from cross-classifying factors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

aggregate(x,by,FUN)

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

stack(x, …)

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

unstack(x, …)

A

inverse of stack()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

reshape(x, …)

A

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”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly