Learn R Programming

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

plyr (version 1.1)

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

462,768

Version

1.1

License

MIT

Maintainer

Hadley Wickham

Last Published

July 24th, 2010

Functions in plyr (1.1)

names.quoted

Compute names of quoted variables.
margins

Figure out margining variables.
list_to_vector

List to vector.
desc

Descending order.
dim.idf

Immutable df dimensions.
quickdf

Quick data frame.
liply

Experimental iterator based version of llply.
as.data.frame.idf

Convert immutable df to regular data frame.
count

Count the number of occurences.
colwise

Column-wise function.
progress_none

Null progress bar...
daply

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

Convert input to quoted variables.
tryapply

Apply with built in try.
splitter_a

Split an array by...
progress_text

Text progress bar.
mdply

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

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

Replicate expression and return results in a list.
summarise

Summarise a data frame.
split_indices

Split indices.
list_to_array

List to array.
rdply

Replicate expression and return results in a data frame.
mlply

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

Print split.
try_default

Try, with default in case of error.
dlply

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

Compact list.
alply

Split array, apply function, and return results in a list.
get1-idf

Immutable df subsetting...
get-split

Subset splits.
list_to_dataframe

List to data frame.
isplit2

Split iterator that returns values, not indices.
empty

Check if a data frame is empty.
maply

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

Construct an immutable data frame.
true

Function that always returns true.
progress_tk

Graphical progress bar, powered by Tk.
create_progress_bar

Create progress bar.
is.discrete

Determine if a vector is discrete.
rbind.fill

Combine data...
defaults

Set defaults.
join.keys

Join keys.
id_var

Numeric id for a vector.
llply

Split list, apply function, and return results in a list.
rbind.fill.matrix

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

Number of dimensions.
r_ply

Replicate expression and discard results.
as.list.split

Convert split list to regular list.
ddply

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

Reduce dimensions.
each

Aggregate multiple functions into a single function.
amv_dimnames

Dimension names.
quoted

Quote variables.
nunique

Number of unique values.
arrange

Order a data frame by its colums.
names.idf

Immutable df names.
amv_dim

Dimensions.
get2-idf

Extract single column from immutable data frame.
join

Join two data frames together.
splitter_d

Split a data frame by variables.
eval.quoted

Evaluate a quoted list of variables.
splat

`Splat' arguments to a function.
split_labels

Generate labels for split data frame.
progress_win

Graphical progress bar, powered by Windows.
d_ply

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

Split list, apply function, and discard results.
add_margins

Add margins to a data frame.
ldply

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

Un-rowname.
id

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

Replicate expression and return results in a array.
aaply

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

Split array, apply function, and discard results.
adply

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

An indexed data frame.
laply

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

Print quoted variables.
failwith

Fail with specified value.
indexed_array

An indexed array.
is.formula

Is a formula?
as.data.frame.function

Make a function return a data frame.