I have a dataframe
TableName Function Argument A func1 3 B func1 4 A func2 6 B func2 2 C func1 5 >
TableName Function Argument A func1 3 B func1 4 A func2 6 B func2 2 C func1 5
No need for any package. Try out:
aggregate(rownames(df) ~ TableName, df, c) TableName rownames(df) 1 A 1, 3 2 B 2, 4 3 C 5 # or setNames(aggregate(rownames(df) ~ TableName, df, c), c("TableName", "Index")) TableName Index 1 A 1, 3 2 B 2, 4 3 C 5