vendredi 26 février 2016

Sorting data into multiple dataframes

I have the following dataset

dataAllFundGroupOverviewTest <- read.csv("AllFundGroupOverviewTest.csv", header=TRUE, sep=",", dec=".")

Which look like: Dataset

What I want to create a dataframe for each benchmark name (column 2), and add the the corresponding row values. Basically the same as the 'sort data function' in excel. So for example the Funds in row 3 and row 5 would go into the same data.frame since they have an identical benchmark, whereas the Fund in row 7 would go into another data.frame.

Is that something that can be done with a few lines of code?

I appreciate any help.

Aucun commentaire:

Enregistrer un commentaire