本文介绍了如何禁用科学记数法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含 p 值列的数据框,我想对这些 p 值进行选择.

I have a dataframe with a column of p-values and I want to make a selection on these p-values.

> 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) ,]

如果我在 R 中使用它,这个函数工作得很好.但是如果我在另一个应用程序(星系)中运行它,没有 e-01 的数字例如4.835312e-04 不会被扔掉.

The function works really fine if I use it in R. But if I run it in another application (galaxy), the numbers which don't have e-01 e.g. 4.835312e-04 are not thrown out.

是否有另一种表示 p 值的方法,例如 0.0004835312 而不是 4.835312e-04?

Is there another way to notate p-values, like 0.0004835312 instead of 4.835312e-04?

推荐答案

您可以使用此代码在打印时有效去除科学记数法:

You can effectively remove scientific notation in printing with this code:

options(scipen=999)

这篇关于如何禁用科学记数法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-19 00:26