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

Use R.utils #363

Closed
2 of 3 tasks
chainsawriot opened this issue Sep 12, 2023 · 3 comments
Closed
2 of 3 tasks

Use R.utils #363

chainsawriot opened this issue Sep 12, 2023 · 3 comments
Labels

Comments

@chainsawriot
Copy link
Collaborator

chainsawriot commented Sep 12, 2023

As R.utils is introduced in #362

  • R.utils::isURL

rio/R/import.R

Line 105 in 0cb72f1

if (grepl("^http.*://", file)) {

  • R.utils::mkdirs

rio/R/export.R

Line 105 in 0cb72f1

.create_directory_if_not_exists(file = file) ## fix 347

  • R.utils::doCall rather than arg_reconcile?

Anymore?

@chainsawriot
Copy link
Collaborator Author

chainsawriot commented Sep 12, 2023

  • R.utils::isPackageInstalled

rio/R/suggestions.R

Lines 21 to 32 in 0cb72f1

uninstalled_formats <- function() {
all_functions <- unlist(rio_formats[rio_formats$type == "suggest", c("import_function", "export_function")], use.names = FALSE)
suggestions <- unique(stats::na.omit(stringi::stri_extract_first(all_functions, regex = "[a-zA-Z0-9\\.]+")))
# which are not installed
unlist(lapply(suggestions, function(x) {
if (length(find.package(x, quiet = TRUE))) {
NULL
} else {
x
}
}))
}

@chainsawriot
Copy link
Collaborator Author

Research

@schochastics
Copy link
Member

Research

* [ ]  Can [gp issues #319](https://github.com/gesistsa/rio/issues/319) be fixed by R.utils compression functions?

I could so far not make compressFile compress to a valid zip archive

chainsawriot added a commit that referenced this issue Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants