I have a dataframe that I am trying to group so I can do some basic stats on each group. However, since the column I am using to group is a character vector, I am not successful in my various attempts to get this done. Here is a sample
Name Value rate
1 SW115 25 3
2 SW115 34 3
3 SW115 25 3
4 SW115 30 3
5 SW115 36 3
6 SW345 32 4
7 SW345 43 4
8 SW345 35 4
9 SW345 24 4
10 SW345 23 4
11 SW445 32 5
12 SW445 33 5
13 SW445 24 5
14 SW445 35 5
15 SW445 25 5
As I said, I would like to group it by "name", and find the mean and cv of of "value" for each group. So, in my example, SW115 would be a group and SW345 would be another group, and I would like to know the mean, sd, and coefficient of variation of each group. I can do this manually by subsetting, but the original data I am working wits has over 5000 rows with about 57 possible groups and it would take me hours to go through each group manually. I know there has to be a way to get it done with a few line of codes so that it pits out the summary for each group all that once.
I tried converting the column "name" to a numbers (so that each group has a number), but I just couldn't get it done as well.
Any suggestions would be greatly appreciated