Displaying 2 results from an estimated 2 matches for "submax".
Did you mean:
submap
2017 Jun 01
3
Post for R
...sed on the second max values. Now I want to do the combinations based on L1 and L2. I want to do a for loop for L1 and for each element in L1, I split it into 10 groups based on L2. I tried to write the code, but it does not work.
L1<-split(df,cut(df$max,seq(0,1,by=0.01)))L2<-split(df,cut(df$submax,seq(0,0.2,by=0.02)))
Z<-list()G<-list()for (i in length(L1)){? Z=data.frame(L1[i])? G <- split(Z$submax,"0.02")? print(G)??}
Thanks so much!Carrie
[[alternative HTML version deleted]]
2017 Jun 01
0
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
<r-help at r-project.org> wrote:
>
> 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 li...