Question - Using as.period within a package #664
Closed
Comments
It should work without attaching the package. ## in a new session on a similar platform as yours
> lubridate::as.period(x = 10, unit = 'day')
[1] "10d 0H 0M 0S" Might be an instalation issue. Please try to reinstall lubridate. If you use lubridate as imports you can also specify which functions you would like to use and use them without #' @importFrom lubridate as.period or in NAMESPACE
|
Odd. It might be an installation issue. On the + side, |
Actually I can reproduce. It's because of the match.fun within as.period. It looks like that function has a non dynamic lookup which is rather unexpected. Give me a sec. |
Actually it has a dynamic lookup which was the cause of the problem. Thanks for reporting this! |
Wow, super quick!! Thanks @vspinu ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Situation
I don't wish to write
require(lubridate)
in my package. However, not doing so results in an error.Error & Reproducible Example
In a brand new R session.
In a brand new R session.
Why is this behavior true?
Background
I'm writing a package which uses the
lubridate::as.period
function and would like to make a call like:(In the package,
lubridate
is set asImports:
)Version Information
The text was updated successfully, but these errors were encountered: