Learn R Programming

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

plyr (version 1.6)

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

Copy Link

Version

Install

install.packages('plyr')

Monthly Downloads

462,768

Version

1.6

License

MIT

Maintainer

Hadley Wickham

Last Published

July 29th, 2011

Functions in plyr (1.6)

as.data.frame.function

Make a function return a data frame.
desc

Descending order.
[.split

Subset splits.
adply

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

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

Column-wise function.
count

Count the number of occurences.
join.keys

Join keys. Given two data frames, create a unique key for each row.
compact

Compact list.
amv_dimnames

Dimension names.
failwith

Fail with specified value.
join

Join two data frames together.
id

Compute a unique numeric id for each unique row in a data frame.
isplit2

Split iterator that returns values, not indices.
dlply

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

Null progress bar
dims

Number of dimensions.
nunique

Number of unique values.
id_var

Numeric id for a vector.
liply

Experimental iterator based version of llply.
amv_dim

Dimensions.
mdply

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

Create progress bar.
m_ply

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

An indexed array.
as.list.split

Convert split list to regular list.
indexed_df

An indexed data frame.
empty

Check if a data frame is empty.
a_ply

Split array, apply function, and discard results.
arrange

Order a data frame by its colums.
laply

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

Is a formula? Checks if argument is a formula
as.quoted

Convert input to quoted variables.
ldply

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

Loop apply
ddply

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

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

Extract matching rows of a data frame.
daply

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

Determine if a vector is discrete.
print.quoted

Print quoted variables.
print.split

Print split.
r_ply

Replicate expression and discard results.
true

Function that always returns true.
quickdf

Quick data frame.
split_labels

Generate labels for split data frame.
summarise

Summarise a data frame.
progress_win

Graphical progress bar, powered by Windows.
d_ply

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

Remove splitting variables from a data frame.
rlply

Replicate expression and return results in a list.
rbind.fill.matrix

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

Quote variables to create a list of unevaluated expressions for later evaluation.
mutate

Mutate a data frame by adding new or replacing existing columns.
reduce_dim

Reduce dimensions.
mlply

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

Round to multiple of any number.
rename

Modify names by name, not position.
splitter_d

Split a data frame by variables.
raply

Replicate expression and return results in a array.
alply

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

Combine data.frames by row, filling in missing columns.
vaggregate

Vector aggregate.
splitter_a

Split an array by .margins.
ozone

Monthly ozone measurements over Central America.
try_default

Try, with default in case of error.
list_to_dataframe

List to data frame.
names.quoted

Compute names of quoted variables.
baseball

Yearly batting records for all major league baseball players
aaply

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

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

`Splat' arguments to a function.
progress_tk

Graphical progress bar, powered by Tk.
eval.quoted

Evaluate a quoted list of variables.
progress_text

Text progress bar.
unrowname

Un-rowname.
list_to_vector

List to vector.
each

Aggregate multiple functions into a single function.
l_ply

Split list, apply function, and discard results.
defaults

Set defaults.
rdply

Replicate expression and return results in a data frame.
idata.frame

Construct an immutable data frame.
list_to_array

List to array.
split_indices

Split indices.