如何停用R中数字的科学计数法?
我们可以使用options(scipen=999)来做到这一点。
示例
> x <-c(253,254,36,874,351,651,245,274,19,1095) > t.test(x,mu=2000)
一次样本t检验
data: x t = -14.212, df = 9, p-value = 1.801e-07 alternative hypothesis: true mean is not equal to 2000
95%置信区间-
151.3501 659.0499
样本估计-
mean of x 405.2
p值是科学计数法。现在我们可以如下停用它-
> options(scipen=999) > t.test(x,mu=2000)
一次样本t检验
data: x t = -14.212, df = 9, p-value = 0.0000001801 alternative hypothesis: true mean is not equal to 2000
95%置信区间-
151.3501 659.0499
样本估计-
mean of x 405.2
如果我们要再次激活科学计数法,则可以如下所示进行操作-
> options(scipen=0) > t.test(x,mu=2000)
一次样本t检验
data: x t = -14.212, df = 9, p-value = 1.801e-07 alternative hypothesis: true mean is not equal to 2000
95%置信区间-
151.3501 659.0499
样本估计-
mean of x 405.2
热门推荐
1 狗狗技能训练
5 如何训练狗狗笑
6 狗狗训练排便
9 狗狗响片训练
10 如何训练狗狗不捡食
11 狗狗尿训练
12 怎么训练狗狗找东西
13 狗狗训练站立
14 狗狗训练飞盘
15 鞍山狗狗训练
16 怎样训练泰迪狗狗谢谢
17 狗狗外出训练
18 怎么训练金毛狗狗大小便