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 rversions::r_release() to get current release version #3

Open
csoneson opened this issue Apr 27, 2022 · 0 comments
Open

Use rversions::r_release() to get current release version #3

csoneson opened this issue Apr 27, 2022 · 0 comments

Comments

@csoneson
Copy link
Contributor

Another thought: would it make sense to use

currentR <- as.numeric_version(rversions::r_release()$version)

in place of

currentR <- readLines("https://rversions.r-pkg.org/r-release/")
currentR <- grep("version", currentR, value = TRUE, fixed = TRUE)
currentR <- gsub(".*version.*([0-9]\\.[0-9]+\\.[0-9]+).*", "\\1", x = currentR)
currentR <- as.numeric_version(currentR)

The latter still seems to return 4.1.2 while the former gives 4.2.0.

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

1 participant