Top "Plyr" questions

plyr is an R package with tools to solve a variety of problems using the split-apply-combine strategy

doing a plyr operation on every row of a data frame in R

I like the plyr syntax. Any time I have to use one of the *apply() commands I end up kicking …

r plyr
Blend of na.omit and na.pass using aggregate?

I have a data set containing product prototype test data. Not all tests were run on all lots, and not …

r aggregate plyr summary
How to use ddply to add a column to a data frame?

I have a data frame that looks like this: site date var dil 1 A 7.4 2 2 A 6.5 2 1 A 7.3 3 2 A 7.3 3 1 B 7.1 1 2 B 7.7 2 1 B 7.7 3 2 …

r plyr
R: Generic flattening of JSON to data.frame

This question is about a generic mechanism for converting any collection of non-cyclical homogeneous or heterogeneous data structures into a …

json r dataframe plyr data.table
Remove group from data.frame if at least one group member meets condition

I have a data.frame where I'd like to remove entire groups if any of their members meets a condition. …

r subset plyr
How does one aggregate and summarize data quickly?

I have a dataset whose headers look like so: PID Time Site Rep Count I want sum the Count by …

r plyr data.table
Why does summarize or mutate not work with group_by when I load `plyr` after `dplyr`?

Note: The title of this question has been edited to make it the canonical question for issues when plyr functions …

r dplyr plyr r-faq
R: speeding up "group by" operations

I have a simulation that has a huge aggregate and combine step right in the middle. I prototyped this process …

performance r plyr
Is there a R function that applies a function to each pair of columns?

I often need to apply a function to each pair of columns in a dataframe/matrix and return the results …

r apply plyr
lm called from inside dlply throws "0 (non-NA) cases" error [r]

I'm using dlply() with a custom function that averages slopes of lm() fits on data that contain some NA values, …

r plyr lm