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

hts_prep_triprate doesn't drop the correct "NA" columns #158

Closed
ashleyasmus opened this issue Jun 6, 2024 · 0 comments
Closed

hts_prep_triprate doesn't drop the correct "NA" columns #158

ashleyasmus opened this issue Jun 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ashleyasmus
Copy link
Collaborator

This line of code should drop columns that are "NA," helping us pivot from wide to long format in this gymnastics exercise trying to fill in missing levels of byvar // day_id :

na_filled_cols = names(triprate_cast)[names(triprate_cast) %like% "_NA"]

This misses columns that are named EXACTLY NA, which can lead to errors. This line should read:
names(triprate_cast) %like% "_NA" | names(triprate_cast) == "NA"

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

3 participants