Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Python 中,有一种方法可以使用下划线使大数字更具可读性,例如 ,这里多次1000000 == 1_000_000讨论过。但是,R中有类似的东西吗?
1000000 == 1_000_000
谷歌搜索它只是让我了解如何使用format and将变量格式化为字符串formatC。我已经尝试过1_000, 1 000,1'000但1,000它们只会产生错误消息。真的没有解决办法吗?
format
formatC
1_000
1 000
1'000
1,000
Something like this:
as.numeric(gsub("_","", "1_000_000"))