1

When I input a "short" number with decimal places in R, the decimal places are represented:

> c(5.4, 3.8)
[1] 5.4 3.8

But when I input a "long" number with decimal places, the decimal places are rounded in R:

> 1.00000004
[1] 1

> 3434456.9 - 0.1
[1] 3434457

Why is that and how do I keep my decimal places? I do not want a rounded result!

  • 1
    Decimal places are not lost, they are just not printed. We can control how many digits to print, see linked post. – zx8754 Jan 31 '19 at 08:15
  • @zx8754 Thank you, that answers my question. –  Jan 31 '19 at 08:26

0 Answers0