plyr refers to a set of tools for splitting, applying and combining data in R.

learn more… | top users | synonyms

0
votes
0answers
4 views

Splitting and iterative simple regression in r [migrated]

I am pretty much new to r and I have a dummy example of a bigger table underneath. I want to split the table based on id variable (a,b,c,d) and do iterative simple linear regression for every subset: ...
11
votes
6answers
7k views

Fast ways in R to get the first row of a data frame grouped by an identifier

Sometimes I need to get only the first row of a data set grouped by an identifier, as when retrieving age and gender when there are multiple observations per individual. What's a fast (or the fastest) ...
10
votes
6answers
3k views

How to find summary statistics for all unique combinations of factors in a data.frame in R?

I want to calculate a summary of a variable in a data.frame for each unique combination of factors in the data.frame. Should I use plyr to do this? I am ok with using loops as opposed to apply() ; so ...