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

glue and cli available #72

Closed
chainsawriot opened this issue Feb 23, 2023 · 4 comments
Closed

glue and cli available #72

chainsawriot opened this issue Feb 23, 2023 · 4 comments

Comments

@chainsawriot
Copy link
Collaborator

With vctrs introduced to fix #69, we can now use glue and cli. vctrs needs them anyway.

We can somehow

.g <- glue::glue
handle <- "rtoot"
.g("cran::{handle}")
@schochastics
Copy link
Member

any benefit of using this over paste?

@chainsawriot
Copy link
Collaborator Author

Performance-wise no. But the code would probably be less verbose, e.g.

https://github.com/chainsawriot/rang/blob/eb00dbb0491cf50aa3e19a5a2069f1fef8d8003f/R/installation.R#L174

cran_mirror <- "https://cran.r-project.org/"
x <- "mongolite"
version <- "2.7.1"
.g <- glue::glue

##paste
paste(cran_mirror, "src/contrib/Archive/", x, "/", x, "_", version, ".tar.gz", sep = "")
##g
.g("{cran_mirror}src/contrib/Archive/{x}/{x}_{version}.tar.gz")

@schochastics
Copy link
Member

I let you make this call. Personally, I prefer paste, but I am fine with switching to glue

@chainsawriot
Copy link
Collaborator Author

Let's keep paste for now.

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