0

I have a dataframe like this

q1   q2  q3
A    12  15
A    17  29
A    10  13
B    33  56
B    46  35
B    25  64

and I want to split it to different dataframes, which I do with

split(df1, df1$q1)

I get that part, but I want to make calculations on each of newly created dataframes. How do I name and save those splitted parts to a new dataframes?

camille
  • 16,432
  • 18
  • 38
  • 60
Vesnič
  • 365
  • 5
  • 17
  • 9
    I would suggest to keep it in a list instead of creating new objects On the `list`, you can do `lapply(lst1, yourfunction)` – akrun Feb 25 '19 at 14:48
  • 4
    See gregor's answer to [this post](https://stackoverflow.com/questions/17499013/how-do-i-make-a-list-of-data-frames) for some tips. – lmo Feb 25 '19 at 14:50

0 Answers0