1
x <- 1626307200
y <- 0.034

x+y

I want to add these two numbers in r and save it as a float (1626307200.034). Both numbers are in numeric format. Tried several ways but didn't work

Gregor Thomas
  • 119,032
  • 17
  • 152
  • 277

1 Answers1

0

There is a command to allow R to display more digits:

options(digits = 15)
x <- 1626307200
y <- 0.034

z = x + y
z # 1626307200.034
Russ Conte
  • 31
  • 4