Learn R Programming

⚠️There's a newer version (1.8.9) of this package.Take me there.

plyr (version 1.0.2)

Tools for splitting, applying and combining data

Description

plyr is a set of tools that solves a common set of problems: you need to break a big problem down into manageable pieces, operate on each pieces and then put all the pieces back together. For example, you might want to fit a model to each spatial location or time point in your study, summarise data by panels or collapse high-dimensional arrays to simpler summary statistics.

Copy Link

Version

Install

install.packages('plyr')

Monthly Downloads

358,508

Version

1.0.2

License

MIT

Maintainer

Hadley Wickham

Last Published

July 6th, 2010

Functions in plyr (1.0.2)

as.data.frame.function

Make a function return a data frame.
mdply

Call function with arguments in array or data frame, returning a data frame.
get1-idf

Immutable df subsetting...
l_ply

Split list, apply function, and discard results.
join.keys

Join keys.
as.quoted

Convert input to quoted variables.
desc

Descending order.
laply

Split list, apply function, and return results in an array.
compact

Compact list.
as.list.split

Convert split list to regular list.
adply

Split array, apply function, and return results in a data frame.
dim.idf

Immutable df dimensions.
names.idf

Immutable df names.
colwise

Column-wise function.
tryapply

Apply with built in try.
count

Count the number of occurences.
eval.quoted

Evaluate a quoted list of variables.
ddply

Split data frame, apply function, and return results in a data frame.
list_to_array

List to array.
daply

Split data frame, apply function, and return results in an array.
failwith

Fail with specified value.
arrange

Order a data frame by its colums.
isplit2

Split iterator that returns values, not indices.
try_default

Try, with default in case of error.
defaults

Set defaults.
list_to_dataframe

List to data frame.
splitter_d

Split a data frame by variables.
get2-idf

Extract single column from immutable data frame.
raply

Replicate expression and return results in a array.
progress_text

Text progress bar.
amv_dim

Dimensions.
amv_dimnames

Dimension names.
reduce_dim

Reduce dimensions.
each

Aggregate multiple functions into a single function.
indexed_df

An indexed data frame.
ldply

Split list, apply function, and return results in a data frame.
dlply

Split data frame, apply function, and return results in a list.
maply

Call function with arguments in array or data frame, returning an array.
join

Join two data frames together.
is.formula

Is a formula?
rbind.fill.matrix

Bind matrices by row, and fill missing columns with NA.
alply

Split array, apply function, and return results in a list.
aaply

Split array, apply function, and return results in an array.
rdply

Replicate expression and return results in a data frame.
summarise

Summarise a data frame.
r_ply

Replicate expression and discard results.
list_to_vector

List to vector.
m_ply

Call function with arguments in array or data frame, discarding results.
llply

Split list, apply function, and return results in a list.
splat

`Splat' arguments to a function.
id

A unique numeric id for each unique row in a data frame.
dims

Number of dimensions.
add_margins

Add margins to a data frame.
get-split

Subset splits.
id_var

Numeric id for a vector.
is.discrete

Determine if a vector is discrete.
rbind.fill

Combine data...
liply

Experimental iterator based version of llply.
mlply

Call function with arguments in array or data frame, returning a list.
progress_none

Null progress bar...
progress_win

Graphical progress bar, powered by Windows.
names.quoted

Compute names of quoted variables.
print.quoted

Print quoted variables.
quoted

Quote variables.
progress_tk

Graphical progress bar, powered by Tk.
as.data.frame.idf

Convert immutable df to regular data frame.
empty

Check if a data frame is empty.
true

Function that always returns true.
unrowname

Un-rowname.
margins

Figure out margining variables.
print.split

Print split.
splitter_a

Split an array by...
split_indices

Split indices.
quickdf

Quick data frame.
nunique

Number of unique values.
indexed_array

An indexed array.
split_labels

Generate labels for split data frame.
d_ply

Split data frame, apply function, and discard results.
rlply

Replicate expression and return results in a list.
a_ply

Split array, apply function, and discard results.
create_progress_bar

Create progress bar.
idata.frame

Construct an immutable data frame.