【问题标题】:R displays numbers in scientific notation [duplicate]R以科学计数法显示数字[重复]
【发布时间】:2014-02-02 10:10:42
【问题描述】:

函数的结果以科学计数形式显示,我想将其改回正常,但仅针对该函数,我不想更改全局设置。有人可以帮忙吗?

【问题讨论】:

    标签: r


    【解决方案1】:

    你可以这样做:

    format(functionResult, scientific=FALSE);
    

    或:

    as.integer(functionResult);
    

    【讨论】:

    • 您也可以使用 round 指定小数点:round(functionResult,2)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-11-16
    • 2011-10-18
    • 1970-01-01
    • 2023-04-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多