As said in the title: Why is there no such function? Or in a different way: What is the type of the function? When I type ?update
I get something from stats
package, but there is a lubridate function as described here on page 7. There also seems to be a lubridate:::update.Date
function, but I can't find any explanations for that function.
Backround: I use the function in a package and I only got it to work after I used the Depends:
in the decription file. Initially I wanted to use lubridate::update()
...
You need to load the lubridate package:
Outputs:
"2016-08-04 08:58:08 CEST"
"2010-01-01 08:58:08 CET"
The
lubridate
package provides the methodslubridate:::update.Date()
andlubridate:::update.POSIXt()
. Those functions are not exported into the namespace, but I assume that, by means of function overloading, they are invoked whenupdate()
is applied to aPOSIX
orDate
object when the lubridate library is loaded.The help page
?lubridate:::update.POSIXt
provides some information concerning theupdate
function within thelubridate
package:The usage section and the examples in the help page indicate that these functions don't need to be addressed individually, as they are called by simply using
update()
when thelubridate
library is loaded.To inspect these functions one can type, e.g.,
lubridate:::update.POSIXt
in the console (without passing arguments, and without the parentheses).