-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add passthrough for keep_units()
when units are not provided
#394
base: main
Are you sure you want to change the base?
Conversation
keep_units()
when units are not provided
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind adding some details about this usage to the documentation of the function? Also maybe some examples about this random generation with days, years, rates...
if (inherits(try(unit, silent = TRUE), "symbolic_units")) { | ||
set_units(do.call(FUN, list(x, ...)), unit, mode = "standard") | ||
} else { | ||
warning("`x` does not have units.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe "wrong unit
specification" or something similar? Because the user may have defined unit
explicitly and still get it wrong.
fixes #392