[英]R: Getting dplyr & summary to show more than 3 digits
这失败了。 我需要小数点右边的 3 位数字。
require("dplyr")
options(digits = 10)
group_by(MyData, Type_1, Type_2) %>%
summarise(
count = n(),
mean = mean(Rate, na.rm = TRUE),
sd = sd(Rate, na.rm = TRUE)
)
# A tibble: 4 x 5
# Groups: Type_1 [2]
Type_1 Type_2 count mean sd
<fct> <fct> <int> <dbl> <dbl>
1 A X 8 1203. 120.
2 A Y 8 1324. 99.1
3 B X 8 1162. 106.
4 B Y 8 1639. 118.
我也试过
options(pillar.sigfigs=10)
我正在寻找一个单行的答案。 我用什么替换上面的数字设置?
谢谢你的帮助。
问题是我曾经说过要使用的参考
options(pillar.sigfigs=7)
当你需要使用
options(pillar.sigfig=7)
并且 R 不会给你一个错误,说它不知道pillar.sigfigs
是什么意思。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.