Skip to content
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

Feature request: Pass missing values without error #63

Closed
jdblischak opened this issue Feb 3, 2018 · 2 comments
Closed

Feature request: Pass missing values without error #63

jdblischak opened this issue Feb 3, 2018 · 2 comments

Comments

@jdblischak
Copy link
Contributor

Would it be possible to pass missing values without error? For example, if I pass a character vector of paths that includes an NA, I'd prefer if the NA was returned. As a comparison, this is the behavior for the functions in the R.utils package.

> p <- c("../../tmp", NA)
> suppressPackageStartupMessages(library("R.utils"))
> getAbsolutePath(p)
../../tmp      <NA> 
   "/tmp"        NA 
> library("fs")
> packageVersion("fs")
[1] ‘1.1.0.9000’
> path_abs(p)
Error in if (any(double_dots)) { : missing value where TRUE/FALSE needed
@jimhester
Copy link
Member

Oh this example is actually a bug, the path_*() functions should all pass them through unchanged.

@jimhester
Copy link
Member

Would you mind opening a new issue about the NA handling in the modification functions like file_move(NA).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants