How to convert million units into dozens unit in R?

Asked

Viewed 732 times

3

Suppose I have the number 80 million.

Numero = 80000000

print(Numero)

[1] 8e+07

Because it is a large number the R already shows me in Scientific Number, but I would like to convert that number that is in Thousand Unit, in Unit of Ten, getting something like:

80 E

The idea was to display a number that was easier to visualize, where anyone who looks knows it’s 80 million. That’s possible?

1 answer

5


You can use the package humanize:

Numero = 80000000000

humanize::count_as_word(Numero)
# [1] "80.0 billion"
  • Exactly what I need Willian, in my example I think I put a few more zeros.

  • I edited the question to avoid confusion.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.