-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fix compact_list() for labelled + other vctrs classes #880
Open
bwiernik
wants to merge
15
commits into
main
Choose a base branch
from
compact_list_labelled
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.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5253441
Prepare CRAN submission
strengejacke 9a1c851
cran comments
strengejacke 6c86c36
comments
strengejacke 85eb328
Fix compact_list() for labelled + other vctrs classes
bwiernik 584bca9
fix
strengejacke 45499b1
fix vctrs issue
strengejacke 819c578
news
strengejacke 40c4fbc
typo
strengejacke 300ef47
submitted
strengejacke f062fd7
Fix compact_list() for labelled + other vctrs classes
bwiernik d70f73b
Remove character "NULL" comparison to avoid vctrs errors
bwiernik 399c9e4
Update utils_compact.R
bwiernik 64a1cce
Remove unnecessary test
bwiernik dca73b7
Preserve check against character "NULL"
bwiernik c6d1394
Fix failing test
bwiernik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Version: 0.19.11 | ||
Date: 2024-05-12 17:57:07 UTC | ||
SHA: b850f730c05480293504a2b81217d9244de20f3e | ||
Version: 0.20.0 | ||
Date: 2024-06-03 12:54:55 UTC | ||
SHA: 40c4fbce021ca275d823719e60f74717ff61f33d |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1 +1,9 @@ | ||
This release is required for the planned update of the 'parameters' package, which will be released once 'insight' is on CRAN. The 'parameters' update fixes errors in CRAN checks. | ||
This release fixes errors in CRAN checks. | ||
|
||
Additionally, in the process of stabilizing the API/user interface for packages | ||
from the 'easystats' project, some argument names were renamed and old names | ||
have been deprecated. This will *not break* downstream dependent packages, however, | ||
reverse-dependency checks will raise warnings. We have already patched all | ||
affected downstream packages and will submit them to CRAN in the next few days, | ||
after the release of 'insight'. Once this release-cycle is complete, all | ||
warnings due to deprecated argument names should be resolved. |
This file contains 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 |
---|---|---|
@@ -1,19 +1,19 @@ | ||
test_that("compact_list works as expected", { | ||
expect_equal(compact_list(list(NULL, 1, c(NA, NA))), list(1, c(NA, NA))) | ||
expect_equal(compact_list(c(1, NA, NA)), c(1, NA, NA)) | ||
expect_equal(compact_list(list(NULL, 1, list(NULL, NULL))), list(1)) | ||
expect_equal(compact_list(c(1, NA, NA), remove_na = TRUE), 1) | ||
expect_equal(compact_list(c(1, 2, 3), remove_na = TRUE), c(1, 2, 3)) | ||
expect_equal(compact_list(""), "") | ||
expect_identical(compact_list(list(NULL, 1, c(NA, NA))), list(1, c(NA, NA))) | ||
expect_identical(compact_list(c(1, NA, NA)), c(1, NA, NA)) | ||
expect_identical(compact_list(list(NULL, 1, list(NULL, NULL))), list(1)) | ||
expect_identical(compact_list(c(1, NA, NA), remove_na = TRUE), 1) | ||
expect_identical(compact_list(c(1, 2, 3), remove_na = TRUE), c(1, 2, 3)) | ||
expect_identical(compact_list(""), "") | ||
expect_null(compact_list(NULL)) | ||
expect_equal(compact_list(logical(0)), logical(0)) | ||
expect_identical(compact_list(logical(0)), logical(0)) | ||
}) | ||
|
||
test_that("compact_list, logical > 1", { | ||
x <- list(a = 1, b = c(1, 2), c = NA) | ||
expect_equal(compact_list(x, remove_na = TRUE), list(a = 1, b = c(1, 2))) | ||
expect_equal(compact_list(x, remove_na = FALSE), list(a = 1, b = c(1, 2), c = NA)) | ||
expect_identical(compact_list(x, remove_na = TRUE), list(a = 1, b = c(1, 2))) | ||
expect_identical(compact_list(x, remove_na = FALSE), list(a = 1, b = c(1, 2), c = NA)) | ||
x <- list(a = 1, b = c(NA, NA), c = NA) | ||
expect_equal(compact_list(x, remove_na = TRUE), list(a = 1)) | ||
expect_equal(compact_list(x, remove_na = FALSE), list(a = 1, b = c(NA, NA), c = NA)) | ||
expect_identical(compact_list(x, remove_na = TRUE), list(a = 1)) | ||
expect_identical(compact_list(x, remove_na = FALSE), list(a = 1, b = c(NA, NA), c = NA)) | ||
}) |
This file contains 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Currently doesn't work on devel - potential fixest issue? | ||
skip_if(TRUE) | ||
|
||
skip_on_os("mac") | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't use lambdas here due to backwards compatibility.