Re: [R] dplyr summarize by groups

2024-11-30 Thread Rui Barradas
Às 05:52 de 23/11/2024, tgs77m--- via R-help escreveu: # Get mean, min, max sigma and skew by group options (digits = 3) library (ISwR data(energy) data %>% group_by(stature) %>% summarize( Mean = mean(expend), Min = min(expend), Max = max(expend), Sigma = sd(expe

Re: [R] dplyr summarize by groups

2024-11-23 Thread Eric Berger
This is because options(digits=3) specifies the number of significant digits, not the number of decimal places. See ?options and search for digits. > a <- 12.345 > options(digits=4) > print(a) [1] 12.35 > options(digits=5) > print(a) [1] 12.345 > options(digits=2) > print(a) [1] 12 > On Sat, Nov

[R] dplyr summarize by groups

2024-11-22 Thread tgs77m--- via R-help
# Get mean, min, max sigma and skew by group options (digits = 3) library (ISwR data(energy) data %>% group_by(stature) %>% summarize( Mean = mean(expend), Min = min(expend), Max = max(expend), Sigma = sd(expend), Skew = skew(expend)) # Output stature Mean Min