I've successfully created a table and summary of the data, but how can I extract the means from the table? (mean(VeryActiveminutes), mean(FairlyActiveMinutes), etc.). Is there something I can add to the summary function?
totalTime <- Activity %>%
select(VeryActiveMinutes, FairlyActiveMinutes, LightlyActiveMinutes, SedentaryMinutes) %>%
summary()
(https://i.stack.imgur.com/XuaiA.png)
I've tried using mean(), but unable to inside a table. I've also tried summing the values of each dataset,
AvgVeryActiveMinutes=sum(VeryActiveMinutes$VeryActiveMinutes)/nrow(VeryActiveMinutes)
but that seems quite repetitive.