Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 如何禁用科学记数法?_R_Formatting_Scientific Notation - Fatal编程技术网

R 如何禁用科学记数法?

R 如何禁用科学记数法?,r,formatting,scientific-notation,R,Formatting,Scientific Notation,我有一个数据框,其中有一列p值,我想对这些p值进行选择 > pvalues_anova [1] 9.693919e-01 9.781728e-01 9.918415e-01 9.716883e-01 1.667183e-02 [6] 9.952762e-02 5.386854e-01 9.997699e-01 8.714044e-01 7.211856e-01 [11] 9.536330e-01 9.239667e-01 9.645590e-01 9.478572e-01 6.243775

我有一个数据框,其中有一列p值,我想对这些p值进行选择

> pvalues_anova
[1] 9.693919e-01 9.781728e-01 9.918415e-01 9.716883e-01 1.667183e-02
[6] 9.952762e-02 5.386854e-01 9.997699e-01 8.714044e-01 7.211856e-01
[11] 9.536330e-01 9.239667e-01 9.645590e-01 9.478572e-01 6.243775e-01
[16] 5.608563e-01 1.371190e-04 9.601970e-01 9.988648e-01 9.698365e-01
[21] 2.795891e-06 1.290176e-01 7.125751e-01 5.193604e-01 4.835312e-04
选择方式:

anovatest<- results[ - which(results$pvalues_anova < 0.8) ,]

anovatest您可以使用此代码在打印时有效地删除科学符号:

options(scipen=999)
给予


如果要将其还原为me:=),默认的
scipen
0
(请参见
getOption(“scipen”)
)是否可以仅在一个特定命令中使用
scipen
,如
print(x,dig=6)
?例如
摘要(m1,scipen=999)
打印(x,scipen=999)
?那太酷了。因为全局设置可能有问题。@TMS:答案如下::
format(functionResult,scientific=FALSE)
为.integer(函数结果)
@TMS您如何在默认情况下禁用它,以便在打开新会话时不必重做该命令?为了简化您的生活,R的默认行为使其成为可能的副本,即此命令的副本。
format(99999999,scientific = F)
99999999