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

missing data lecture replace_na shows 2005 in description but code has zero instead #180

Open
carriewright11 opened this issue Aug 12, 2024 · 1 comment

Comments

@carriewright11
Copy link
Collaborator

carriewright11 commented Aug 12, 2024

Need to save the output of the previous slide where we replace 0s with NAs so that we can replace NAs with 2005 on the next slide
so change this:

bike %>% 
  mutate(dateInstalled = na_if(dateInstalled, 0))

To this:

bike <- bike %>% 
  mutate(dateInstalled = na_if(dateInstalled, 0))

to allow this slide to work:

bike %>% 
  mutate(dateInstalled = replace_na(dateInstalled, 2005))
@avahoffman
Copy link
Collaborator

Thank you! Was it clear I did this in the wee hours? 😛

Also need to remove the word key from the student Rmd

title: "Missing Data Lab Key"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants