Displaying 1 result from an estimated 1 matches for "percent_value2".
Did you mean:
percent_value1
2010 Nov 30
1
more flexible "ave"
Hi all,
I would like to calculate the percent of the total per group for this
data.frame:
df <- data.frame(site = c("a", "a", "a", "b", "b", "b"),
gr = c("total", "x1", "x2", "x1", "total","x2"),
value1 = c(212, 56, 87, 33, 456, 213))
df