Re: [R] Post for R

2017-06-01 Thread David L Carlson
ang ; r-help mailing list Subject: Re: [R] Post for R Hi Carrie, You may have a problem with this if some subsets are empty: L3<-lapply(split(df,cut(df$max,seq(0,1,by=0.01))), split,cut(df$submax,seq(0,0.2,by=0.02))) Jim On Thu, Jun 1, 2017 at 12:48 PM, carrie wang via R-help wrote: >

Re: [R] Post for R

2017-06-01 Thread Jim Lemon
Hi Carrie, You may have a problem with this if some subsets are empty: L3<-lapply(split(df,cut(df$max,seq(0,1,by=0.01))), split,cut(df$submax,seq(0,0.2,by=0.02))) Jim On Thu, Jun 1, 2017 at 12:48 PM, carrie wang via R-help wrote: > > Hello, > I want to split the dataframe into 1000 groups base

Re: [R] Post for R

2017-05-31 Thread Hasan Diwan
Carrie, I would suggest a few things before posting your code here: - Put a dput(df) - Format it properly, as it stands it won't compile, because you're missing newlines/semicolons between, e.g. Z <- list()*; *G <- list(); for (i in length(L1)){ Z=data.frame(L1[i])*;* G <- split(Z$submax,"0.02")*;

[R] Post for R

2017-05-31 Thread carrie wang via R-help
Hello,  I want to split the dataframe into 1000 groups based on two column values(max value and second max value). First, I made two lists L1 and L2.  L1 is the list divided into 100 groups based on the range of max value and L2 is divided into 10 groups based on the second max values. Now I wa