-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
data_rename()
: "Error: Following variable(s) were not found" in version '0.13.0.17'
#571
Comments
I'm not sure it was really intended to work on lists, so the revision of |
Note that you cannot use the |
I don't think we should support lists, other library(datawizard)
d <- data.frame(a = 1:3, b = 4:6)
l <- list(a = 1:3, b = 4:6)
data_select(d, "a")
#> a
#> 1 1
#> 2 2
#> 3 3
data_select(l, "a")
#> Warning: No column names that matched the required search pattern were found.
#> NULL It would also be confusing: should |
I think so, too. I don't think this was actually intentional. You could use |
Maybe we should change the description of the
A list is coercible to a dataframe but we don't support it. |
Yes, thought about that, too. I think this mostly makes sense for data frames. The alternative would be to revise |
Yes, agreed, it would make sense for consistency that it works only on data frames. And, it was only used that way once in report, so I was able to switch it to |
…sion '0.13.0.17' (#572) * `data_rename()`: "Error: Following variable(s) were not found" in version '0.13.0.17' Fixes #571 * version * comment * styler, lintr * docs * no lists * Update tests/testthat/test-data_rename.R Co-authored-by: Etienne Bacher <[email protected]> * fix docs * fix * shorter if-condition * fix --------- Co-authored-by: Etienne Bacher <[email protected]>
Yo, trying to integrate the devel version of
datawizard '0.13.0.17'
I'm facing a breaking change indata_rename()
(more info in easystats/report#470). Just wanted to check with you if that's something I should change inreport
ordatawizard
. My attempt at a minimal reprex:datawizard
'0.13.0.17'Created on 2024-12-12 with reprex v2.1.1
datawizard
'0.13.0'Created on 2024-12-12 with reprex v2.1.1
The reason seems to be that
data_rename()
searches for all the variables mentioned in select for each data frame of the list, but each name only appears once in their respective data frame. Therefore, some variables are bound to not be found. So, whereasdata_rename()
used to work on lists, now it only works on dataframes? This seems to breakreport::report_sample
tests.The text was updated successfully, but these errors were encountered: