plyr: Tools for Splitting, Applying and Combining Data

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 piece 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. The development of 'plyr' has been generously supported by 'Becton Dickinson'.

Install the latest version of this package by entering the following in R:
AuthorHadley Wickham [aut, cre]
Date of publication2016-06-08 10:40:15
MaintainerHadley Wickham <>
LicenseMIT + file LICENSE

View on CRAN

Man pages

aaply: Split array, apply function, and return results in an array.

adply: Split array, apply function, and return results in a data...

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

amv_dim: Dimensions.

amv_dimnames: Dimension names.

a_ply: Split array, apply function, and discard results.

arrange: Order a data frame by its colums. Make a function return a data frame.

as.list.split: Convert split list to regular list.

as.quoted: Convert input to quoted variables.

baseball: Yearly batting records for all major league baseball players

colwise: Column-wise function.

compact: Compact list.

count: Count the number of occurences.

create_progress_bar: Create progress bar.

daply: Split data frame, apply function, and return results in an...

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

defaults: Set defaults.

desc: Descending order.

dims: Number of dimensions.

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

d_ply: Split data frame, apply function, and discard results.

each: Aggregate multiple functions into a single function.

empty: Check if a data frame is empty.

eval.quoted: Evaluate a quoted list of variables.

failwith: Fail with specified value.

get-split: Subset splits.

here: Capture current evaluation context.

id: Compute a unique numeric id for each unique row in a data...

idata.frame: Construct an immutable data frame.

id_var: Numeric id for a vector.

indexed_array: An indexed array.

indexed_df: An indexed data frame.

is.discrete: Determine if a vector is discrete.

is.formula: Is a formula? Checks if argument is a formula

isplit2: Split iterator that returns values, not indices.

join: Join two data frames together.

join_all: Recursively join a list of data frames.

join.keys: Join keys. Given two data frames, create a unique key for...

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

ldply: Split list, apply function, and return results in a data...

liply: Experimental iterator based version of llply.

list_to_array: List to array.

list_to_dataframe: List to data frame.

list_to_vector: List to vector.

llply: Split list, apply function, and return results in a list.

loop_apply: Loop apply

l_ply: Split list, apply function, and discard results.

maply: Call function with arguments in array or data frame,...

mapvalues: Replace specified values with new values, in a vector or...

match_df: Extract matching rows of a data frame.

mdply: Call function with arguments in array or data frame,...

mlply: Call function with arguments in array or data frame,...

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

mutate: Mutate a data frame by adding new or replacing existing...

name_rows: Toggle row names between explicit and implicit.

names.quoted: Compute names of quoted variables.

nunique: Number of unique values.

ozone: Monthly ozone measurements over Central America.

plyr: plyr: the split-apply-combine paradigm for R.

plyr-deprecated: Deprecated Functions in Package plyr

print.quoted: Print quoted variables.

print.split: Print split.

progress_none: Null progress bar

progress_text: Text progress bar.

progress_time: Text progress bar with time.

progress_tk: Graphical progress bar, powered by Tk.

progress_win: Graphical progress bar, powered by Windows.

quickdf: Quick data frame.

quoted: Quote variables to create a list of unevaluated expressions...

raply: Replicate expression and return results in a array.

rbind.fill: Combine data.frames by row, filling in missing columns.

rbind.fill.matrix: Bind matrices by row, and fill missing columns with NA.

rdply: Replicate expression and return results in a data frame.

reduce_dim: Reduce dimensions.

rename: Modify names by name, not position.

revalue: Replace specified values with new values, in a factor or...

rlply: Replicate expression and return results in a list.

round_any: Round to multiple of any number.

r_ply: Replicate expression and discard results.

splat: 'Splat' arguments to a function.

split_indices: Split indices.

split_labels: Generate labels for split data frame.

splitter_a: Split an array by .margins.

splitter_d: Split a data frame by variables.

strip_splits: Remove splitting variables from a data frame.

summarise: Summarise a data frame.

take: Take a subset along an arbitrary dimension

true: Function that always returns true.

tryapply: Apply with built in try. Uses compact, lapply and tryNULL

try_default: Try, with default in case of error.

unrowname: Un-rowname.

vaggregate: Vector aggregate.


. Man page
aaply Man page
adply Man page
alply Man page
amv_dim Man page
amv_dimnames Man page
a_ply Man page
arrange Man page Man page
as.list.split Man page
as.quoted Man page
baseball Man page
catcolwise Man page
colwise Man page
compact Man page
count Man page
create_progress_bar Man page
daply Man page
ddply Man page
defaults Man page
desc Man page
dims Man page
dlply Man page
d_ply Man page
each Man page
empty Man page
eval.quoted Man page
failwith Man page
here Man page
id Man page
idata.frame Man page
id_var Man page
[[.indexed_array Man page
indexed_array Man page
indexed_df Man page
is.discrete Man page
is.formula Man page
isplit2 Man page
is.quoted Man page
join Man page
join_all Man page
join.keys Man page
laply Man page
ldply Man page
length.indexed_array Man page
liply Man page
list_to_array Man page
list_to_dataframe Man page
list_to_vector Man page
llply Man page
loop_apply Man page
l_ply Man page
maply Man page
mapvalues Man page
match_df Man page
mdply Man page
mlply Man page
m_ply Man page
mutate Man page
name_rows Man page
names.indexed_array Man page
names.quoted Man page
ninteraction Man page
numcolwise Man page
nunique Man page
ozone Man page
plyr Man page
plyr-deprecated Man page
plyr-package Man page
print.quoted Man page
print.split Man page
progress_none Man page
progress_text Man page
progress_time Man page
progress_tk Man page
progress_win Man page
quickdf Man page
quoted Man page
raply Man page
rbind.fill Man page
rbind.fill.matrix Man page
rdply Man page
reduce_dim Man page
rename Man page
revalue Man page
rlply Man page
round_any Man page
r_ply Man page
splat Man page
[.split Man page
split_indices Man page
split_labels Man page
splitter_a Man page
splitter_d Man page
strip_splits Man page
summarise Man page
summarize Man page
take Man page
true Man page
tryapply Man page
try_default Man page
tryNULL Man page
unrowname Man page
vaggregate Man page


tests/testthat/test-rename.r tests/testthat/test-rply.r tests/testthat/test-arrange.r tests/testthat/test-array.r tests/testthat/test-data-frame.r tests/testthat/test-revalue.r tests/testthat/test-split-indices.r tests/testthat/test-progress.r tests/testthat/test-simplify-df.r tests/testthat/quickdf.r tests/testthat/test-empty.r tests/testthat/test-inform.r tests/testthat/test-mapply.r tests/testthat/test-parallel.r tests/testthat/test-split-labels.r tests/testthat/test-quote.r tests/testthat/test-mutate.r tests/testthat/test-ninteraction.r tests/testthat/test-split-data-frame.r tests/testthat/test-list.r tests/testthat/test-summarise.r tests/testthat/test-debug.r tests/testthat/test-utils.r tests/testthat/test-replicate.r tests/testthat/test-manip.r tests/testthat/test-count.r tests/testthat/test-join.r tests/testthat/test-rbind.r tests/testthat/test-id.r tests/testthat/test-idf.r tests/testthat/test-rbind.matrix.r
R/splitter-d.r R/indexed.r R/id.r R/liply.r R/quote.r R/name-rows.r R/strip-splits.r R/split.r R/splitter-a.r R/loop_apply.R R/indexed-array.r R/dlply.r R/laply.r R/vaggregate.r R/aaply.r R/splat.r R/indexed-data-frame.r R/rbind-fill-matrix.r R/join-all.r R/quickdf.r R/raply.r R/daply.r R/rbind-fill.r R/summarise.r R/utils.r R/join.r R/rdply.r R/plyr-deprecated.r R/here.r R/dimensions.r R/alply.r R/defaults.r R/match-df.r R/r_ply.r R/progress-time.r R/idataframe.r R/l_ply.r R/mutate.r R/adply.r R/rlply.r R/RcppExports.R R/progress.r R/data-frame.r R/llply.r R/each.r R/plyr.r R/a_ply.r R/count.r R/colwise.r R/parallel.r R/mdply.r R/mlply.r R/round-any.r R/list-to-vector.r R/m_ply.r R/rename.r R/arrange.r R/take.r R/data.r R/list-to-dataframe.r R/maply.r R/d_ply.r R/revalue.r R/ddply.r R/list-to-array.r R/ldply.r R/try.r
man/aaply.Rd man/unrowname.Rd man/rbind.fill.Rd man/alply.Rd man/rlply.Rd man/reduce_dim.Rd man/as.quoted.Rd man/names.quoted.Rd man/r_ply.Rd man/join_all.Rd man/is.discrete.Rd man/progress_time.Rd man/is.formula.Rd man/failwith.Rd man/progress_tk.Rd man/id_var.Rd man/indexed_array.Rd man/nunique.Rd man/mlply.Rd man/id.Rd man/mutate.Rd man/progress_win.Rd man/split_indices.Rd man/revalue.Rd man/compact.Rd man/take.Rd man/colwise.Rd man/get-split.Rd man/progress_text.Rd man/d_ply.Rd man/quickdf.Rd man/indexed_df.Rd man/ man/desc.Rd man/rbind.fill.matrix.Rd man/amv_dim.Rd man/splitter_d.Rd man/ddply.Rd man/empty.Rd man/join.keys.Rd man/plyr-deprecated.Rd man/print.split.Rd man/mapvalues.Rd man/loop_apply.Rd man/split_labels.Rd man/baseball.Rd man/liply.Rd man/list_to_dataframe.Rd man/create_progress_bar.Rd man/arrange.Rd man/rename.Rd man/strip_splits.Rd man/as.list.split.Rd man/here.Rd man/dims.Rd man/ozone.Rd man/tryapply.Rd man/join.Rd man/match_df.Rd man/round_any.Rd man/idata.frame.Rd man/splitter_a.Rd man/isplit2.Rd man/rdply.Rd man/quoted.Rd man/laply.Rd man/l_ply.Rd man/vaggregate.Rd man/defaults.Rd man/list_to_array.Rd man/eval.quoted.Rd man/adply.Rd man/daply.Rd man/name_rows.Rd man/m_ply.Rd man/maply.Rd man/count.Rd man/list_to_vector.Rd man/ldply.Rd man/dlply.Rd man/progress_none.Rd man/plyr.Rd man/true.Rd man/each.Rd man/mdply.Rd man/raply.Rd man/llply.Rd man/print.quoted.Rd man/try_default.Rd man/a_ply.Rd man/summarise.Rd man/splat.Rd man/amv_dimnames.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.