我的图以e符号的形式显示y轴上的值。我应该使用哪个命令来获取数值形式的值。使用的文件中的值是数字形式的吗?谢谢
发布于 2014-09-20 17:57:28
要在整个R会话中设置科学记数法的使用,可以使用scipen
选项。从文档(?options
):
‘scipen’: integer. A penalty to be applied when deciding to print
numeric values in fixed or exponential notation. Positive
values bias towards fixed and negative towards scientific
notation: fixed notation will be preferred unless it is more
than ‘scipen’ digits wider.
因此,从本质上讲,这个值决定了触发科学记数法的可能性。因此,为了防止使用科学记数法,只需使用一个较大的正值,如999
options(scipen=999)
发布于 2014-09-20 15:05:30
尝试format
函数:
> xx = 100000000000
> xx
[1] 1e+11
> format(xx, scientific=F)
[1] "100000000000"
https://stackoverflow.com/questions/25946047
复制相似问题