- Notifications
You must be signed in to change notification settings - Fork15
R-devel has changed code#78
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
dmurdoch wants to merge7 commits intor-lib:mainChoose a base branch fromdmurdoch:concordances3
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Open
Changes from1 commit
Commits
Show all changes
7 commits Select commitHold shift + click to select a range
3ded949 Add some of the Rconcordance functions from R 4.3.0 to support RmdCon…
dmurdochf9a5258 Update Roxygen output
dmurdochb0cb6f1 Fix test to work in R-devel
dmurdoch4b85d90 R-devel has updated R concordance functions to handle Windows paths, …
dmurdochddf6bd6 R-devel has made changes to concordance code
dmurdochf5e241d Fix NAMESPACE
dmurdoch5c90eb3 Merge branch 'main' into concordances3
dmurdochFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
R-devel has made changes to concordance code
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
commitddf6bd65c1d173f93f49b87073ed6d2186a890ad
There are no files selected for viewing
21 changes: 20 additions & 1 deletion.github/workflows/rcmdcheck.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionsNAMESPACE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionR/Rconcordance.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletionsR/import.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletionsR/libPaths.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| #' @title Backport of .libPaths for R < 4.1.0 | ||
| #' @rdname libPaths | ||
| #' | ||
| #' @description | ||
| #' See the original description in \code{base::.libPaths}. | ||
| #' | ||
| #' @keywords internal | ||
| #' @rawNamespace if (getRversion() < "4.1.0") export(.libPaths) | ||
| #' @examples | ||
| #' save <- .libPaths() | ||
| #' save | ||
| #' # ignore the site library | ||
| #' .libPaths("test", include.site = FALSE) | ||
| #' | ||
| #' # restore the original | ||
| #' .libPaths(save) | ||
| .libPaths <- local({ | ||
| .lib.loc <- character() # This won't be used; see below | ||
| function(new, include.site = TRUE) { | ||
| if(!missing(new)) { | ||
| ## paths don't really need to be unique, but searching | ||
| ## large library trees repeatedly would be inefficient. | ||
| ## Use normalizePath for display | ||
| new <- Sys.glob(path.expand(new)) | ||
| paths <- c(new, if(include.site) .Library.site, .Library) | ||
| paths <- paths[dir.exists(paths)] | ||
| .lib.loc <<- unique(normalizePath(paths, "/")) | ||
| } | ||
| else | ||
| .lib.loc | ||
| }}) | ||
| # Run this in .onLoad: | ||
| # environment(.libPaths) <- environment(base::.libPaths) | ||
| # This will make our function see and modify the base | ||
| # function's copy of .lib.loc. This relies on the | ||
| # implementation in base, which has been the | ||
| # same since R 1.6.0 or earlier. |
1 change: 1 addition & 0 deletionsR/zzz.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletionsREADME.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletionsman/libPaths.Rd
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
18 changes: 18 additions & 0 deletionstests/test_dotlibPaths.R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| source("helper/helper.R") | ||
| f = get(".libPaths", envir = baseenv()) | ||
| expect_same = makeCompareFun(f, backports:::.libPaths) | ||
| save <- .libPaths() | ||
| f <- tempfile() | ||
| expect_same(f) | ||
| dir.create(f) | ||
| expect_same(f) | ||
| if (getRversion() >= "4.1.0") { | ||
| expect_same(f, include.site = FALSE) | ||
| } else { | ||
| .libPaths(f, include.site = FALSE) | ||
| expect_same() | ||
| } | ||
| .libPaths(save, include.site = length(.Library.site) && .Library.site %in% save) |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.