I have the following R code, but I do not know how to find the correct result. Why has this problem occurred, and how can it be solved? Here is the code that I am running:
axis.Date(1,sites$date, origin="1970-01-01")
And this is the error text I receive:
Error in as.Date.numeric(x) : 'origin' must be supplied
The cause:
You encounter this error because a numeric value is being used in the as.Date() function. The warnings clearly shows that you miss the orignal date of the function.
Solution:
You have to specify the kind of Date for ‘x’ argument in as.Date() as the following:
In addition, this probaly have been used to supplement or revise your initial query.
My R use 1970-01-01
This matches the calculation from