My data set contains Unix timestamp column, that I need to convert in UTC. I used as.POSIXct
to convert the column to UTC, but throws an error like
Error in as.POSIXct.numeric(df$timestamp) : 'origin' must be supplied
I added the origin
as as.POSIXct(df$timestamp, origin="1970-01-01", tz="UTC")
but still getting the same error :(
I am bit new in R and kind of lost! Could someone show me some path?