À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
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
# 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
3 matches
Mail list logo