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

Resolve all issues causing r-cmd to fail #45

Closed
erika-redding opened this issue Jan 9, 2024 · 1 comment
Closed

Resolve all issues causing r-cmd to fail #45

erika-redding opened this issue Jan 9, 2024 · 1 comment
Assignees
Labels

Comments

@erika-redding
Copy link
Collaborator

https://www.r-bloggers.com/2019/08/no-visible-binding-for-global-variable/

Undefined global functions or variables:
. ..byvar_cols ..day_subset_cols ..n_idcols ..n_wtcols
..selected_cols ..subset_cols ..trip_subset_cols as.integer64 binned
data_type day day_id day_weight description est hh hh_id hts_data
i.description is_checkbox mode_1 mode_type num_checked num_trips
person person_id prop quantile shared_name str_extract_all
str_split_i trip trip_id trip_rate trip_weight value value_labels
variable variable_list variables_list vehicle vehicle_id weight
Consider adding
importFrom("stats", "quantile")
importFrom("utils", "person")
to your NAMESPACE file.

@erika-redding erika-redding self-assigned this Jan 9, 2024
@erika-redding
Copy link
Collaborator Author

There's two solutions to this issue.

One is considered a hack:
## quiets concerns of R CMD check re: the .'s that appear in pipelines if(getRversion() >= "2.15.1") utils::globalVariables(c(".")).

The other is considered the proper fix by using @importfrom r lang .data. Then apply the .data to the expression (e.g., df %>% filter(.data$a > 5)).

Naturally we would want to use the hack, but it maybe best to take the long way out and use the proper fix.

source: STAT545-UBC/Discussion#451

erika-redding added a commit that referenced this issue Jan 10, 2024
adding utils::globalVariables() for binding vars #45
erika-redding added a commit that referenced this issue Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants