Re: [R] Reference factors inside split

2022-07-11 Thread Naresh Gurbuxani
This is what I was looking for. Thanks for your quick response and elegant solution. Naresh Sent from my iPhone > On Jul 11, 2022, at 10:00 AM, Ben Tupper wrote: > > Hi, > > The grouping variable is removed from the subgroups when you split. > Instead of iterating over the elements of the

Re: [R] Reference factors inside split

2022-07-11 Thread Ben Tupper
Hi, The grouping variable is removed from the subgroups when you split. Instead of iterating over the elements of the split list, you can iterate over the **names** of the elements. In your case the account name is the grouping variable. ##start library(lattice) mydf <- data.frame( date = re