I have the following code:
data <- c(62, 60, 63, 59, 63, 67, 71, 64, 65, 66, 68, 66,
71, 67, 68, 68, 56, 62, 60, 61, 63, 64, 63, 59)
grp <- factor(rep(LETTERS[1:4], c(4,6,6,8)))
de <- data.frame(group=grp, dt=data)
de %>%
group_by(group) %>%
summarize(mean = mean(dt),
sum = sum(dt))
The code runs well. But I have one questions:
How to store the output result as a dataframe and assign name to it?
Thank you!