Compose the Rscript with file name lubridateTest.Rsh:
#! /usr/bin/RScript
lubridate::round_date(Sys.time(),'minute')
Run it:
jamesmcc@chimayo:~> ./lubridateTest.Rsh
Error in x - eseconds(1) : could not find function "loadMethod"
Calls: <Anonymous> ... as.POSIXct -> ceiling_date -> floor_date -> update -> -
recover called non-interactively; frames dumped, use debugger() to view
This works however:
#! /usr/bin/RScript
library(lubridate)
lubridate::round_date(Sys.time(),'minute')
Run it:
jamesmcc@chimayo:~> ./lubridateTest.Rsh
Loading required package: methods
[1] "2015-04-22 13:25:00 MDT"
I have no idea why, but it just is this way. I'm curious to know however.
Thanks,
J
Compose the Rscript with file name
lubridateTest.Rsh:Run it:
This works however:
Run it:
I have no idea why, but it just is this way. I'm curious to know however.
Thanks,
J