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: ...
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) ...
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 ...