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

spaceTimeGroups: fix .data[[timestampCol]] deprecation #52

Open
kaijagahm opened this issue Jan 23, 2023 · 0 comments
Open

spaceTimeGroups: fix .data[[timestampCol]] deprecation #52

kaijagahm opened this issue Jan 23, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@kaijagahm
Copy link
Owner

I have the following code as part of spaceTimeGroups:

timegroupData <- dataset %>% # save information about when each timegroup starts and ends.
    dplyr::select(.data[[timestampCol]], timegroup) %>% # XXX this is deprecated, fix.
    dplyr::group_by(.data$timegroup) %>%
    dplyr::summarize(minTimestamp = min(.data[[timestampCol]]),
                     maxTimestamp = max(.data[[timestampCol]]))

When I run it, I get this warning:

Warning message:
Use of .data in tidyselect expressions was deprecated in tidyselect 1.2.0.
ℹ Please use `all_of(var)` (or `any_of(var)`) instead of `.data[[var]]`
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated. 

Yet when I try converting .data[[timestampCol]] to all_of(timestampCol), it tells me that the use of all_of and any_of to pass quoted variable names directly is also deprecated. So, how am I supposed to do this? I don't understand.

@kaijagahm kaijagahm added the bug Something isn't working label Jan 23, 2023
@kaijagahm kaijagahm changed the title Fix .data[[timestampCol]] deprecation spaceTimeGroups: fix .data[[timestampCol]] deprecation Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant