Hi all,

Given a data frame:

my.df <- data.frame(a = c(1:5, 1:10, 1:20), b = runif(35))

I want to split it by "a" such that I end up with a list containing 3
components i.e. the first containing a = 1 to 5, the second a = 1 to 10 etc.
In other words, sets of sequences of a.

I can't seem to find the right form using the split function - can you help? 

Much appreciated.

David



-----
Institute for Transport Studies
University of Leeds
-- 
View this message in context: 
http://www.nabble.com/how-to-split-a-data-framed-with-sequences-tp19388964p19388964.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to