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

deaths' table wasn't being filtered by yod==2008, mod!=0, dod!=0 (i… #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevinislas2
Copy link

…t was being assigned to ok dataset but never used again)

ok wasn't being used anywhere after being filtered by year, month and day of death

…t was being assigned to ok dataset but never used again)
@kevinislas2
Copy link
Author

Hi Dr. Hadley!
As part of a Machine Learning course I was asked to reproduce the case study in your paper on Tidy data.
I was using Python's Pandas library to reproduce it and noticed that the deaths' frequency per cause of death wasn't matching with the one on your paper by a small margin, after digging up I noticed that the ok table which is assigned the values of the deaths' table after filtering for year==2008, mod!=0, dod!=0 isn't used anywhere else.
The following function uses the deaths' table meaning that it calculates for causes of death for all years, months and days of death.
After assigning that filter to the deaths table in the R code I noticed I got the same results that I was getting in Python when reproducing the case study (although I'm not sure if it is a mistake on my end)

Best regards!

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

Successfully merging this pull request may close these issues.

1 participant