Learn R Programming

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

plyr (version 1.0.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.0.1

License

MIT

Maintainer

Hadley Wickham

Last Published

July 6th, 2010

Functions in plyr (1.0.1)

failwith

Fail with specified value.
arrange

Order a data frame by its colums.
aaply

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

Dimensions.
dims

Number of dimensions.
amv_dimnames

Dimension names.
as.data.frame.idf

Convert immutable df to regular data frame.
get2-idf

Extract single column from immutable data frame.
laply

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

Is a formula?
get1-idf

Immutable df subsetting...
adply

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

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

Split list, apply function, and discard results.
id_var

Numeric id for a vector.
splat

`Splat' arguments to a function.
llply

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

Split indices.
id

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

Descending order.
dlply

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

Text progress bar.
true

Function that always returns true.
a_ply

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

Join keys.
indexed_array

An indexed array.
list_to_array

List to array.
create_progress_bar

Create progress bar.
reduce_dim

Reduce dimensions.
liply

Experimental iterator based version of llply.
as.quoted

Convert input to quoted variables.
unrowname

Un-rowname.
split_labels

Generate labels for split data frame.
rbind.fill

Combine data...
nunique

Number of unique values.
print.quoted

Print quoted variables.
is.discrete

Determine if a vector is discrete.
quoted

Quote variables.
idata.frame

Construct an immutable data frame.
progress_tk

Graphical progress bar, powered by Tk.
empty

Check if a data frame is empty.
alply

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

Try, with default in case of error.
raply

Replicate expression and return results in a array.
summarise

Summarise a data frame.
tryapply

Apply with built in try.
list_to_dataframe

List to data frame.
print.split

Print split.
r_ply

Replicate expression and discard results.
dim.idf

Immutable df dimensions.
each

Aggregate multiple functions into a single function.
maply

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

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

Split an array by...
compact

Compact list.
d_ply

Split data frame, apply function, and discard results.
get-split

Subset splits.
mdply

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

Graphical progress bar, powered by Windows.
rdply

Replicate expression and return results in a data frame.
quickdf

Quick data frame.
m_ply

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

List to vector.
progress_none

Null progress bar...
count

Count the number of occurences.
names.idf

Immutable df names.
names.quoted

Compute names of quoted variables.
add_margins

Add margins to a data frame.
colwise

Column-wise function.
as.list.split

Convert split list to regular list.
ldply

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

Make a function return a data frame.
defaults

Set defaults.
rbind.fill.matrix

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

Split iterator that returns values, not indices.
join

Join two data frames together.
indexed_df

An indexed data frame.
eval.quoted

Evaluate a quoted list of variables.
daply

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

Figure out margining variables.
rlply

Replicate expression and return results in a list.
splitter_d

Split a data frame by variables.
Baseball batting

Yearly batting records for all major league baseball players
Ozone measurements

Monthly ozone measurements over Central America