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

Comments

Projects
None yet
2 participants
@jdblischak
Copy link

jdblischak commented Feb 3, 2018

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

This comment has been minimized.

Copy link
Member

jimhester commented Feb 3, 2018

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

@jimhester jimhester closed this in 099e6fb Feb 3, 2018

@jimhester

This comment has been minimized.

Copy link
Member

jimhester commented Feb 3, 2018

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