I have a simple grouping function that I need to apply to many different cases in one dataframe. For each character change in "scenario" I would like to create a new dataframe. Thanks for your help
scenario_1 <- subset(data_ag, scenario == "0.1-0.3-0.01-1-0.3-0.35")
scenario_1 <- arrange(scenario_1, desc(X.step.))
and I would like to have something like:
scenario_n+1 <- subset(data_ag, when scenario changes)
scenario_n+1 <- arrange(scenario_n+1, desc(X.step.))