-
Notifications
You must be signed in to change notification settings - Fork 14
paula updates to ajs #331
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
base: recode_templates
Are you sure you want to change the base?
paula updates to ajs #331
Conversation
Updated so that: - some chunk rearrangement and simplification to be more straight forward - accordingly renamed some chunks (e.g. prep_nonDHIS_data not appropriate as there are several chunks) - Removal of summarytools as doesn't work - Clearer explanations - Age calculations corrected (note still need to check 2 months = 62 days or 56? Show years at 24 months onwards?). - Other typos corrected Note it's now aligned with the measles outbreak recode Rmd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PBBlomquist couple comments
|
||
|
||
#linelist_raw <- rio::import(here::here("Data", "linelist.xlsx"), which = "Sheet1") | ||
linelist_raw <- import("dat_msl.RDS") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think you just forgot to remove your line of rds data?
This chunk demonstrates how to recode factor variables. You will need to add to | ||
it based on your dataset by comparing to the variables in the standard data | ||
dictionary. | ||
This chunk is for recoding factor (categorical) variables. You will need to edit this section to recode the values in your dataset to suit the values in the expected linelist format. You can look at the data dictionary object (`recode_dict`) and the outputs from the `browse_data` chunk to write the correct code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can stick to 80 characters a line pls? theres a setting in rstudio to have guideline show
age_num >=2 & age_unit == "Year" ~ age_num, | ||
age_num >= 24 & age_unit == "Month" ~ as.numeric(age_num * 12), | ||
age_num >=2 & age_unit == "Year" ~ as.numeric(age_num), | ||
age_num >= 24 & age_unit == "Month" ~ as.numeric(age_num / 12), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lolz oops
age_num >=2 & age_unit == "Month" ~ age_num, | ||
age_num >=56 & age_unit == "Day" ~ as.numeric(age_num / 30), | ||
age_num >=2 & age_num <24 & age_unit == "Month" ~ age_num, | ||
age_num >=62 & age_num < 730 & age_unit == "Day" ~ as.numeric(age_num / 30), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
happy with leaving as 62, the reason i put over 56 is that if they are born jan or feb then they could be two months old at 59 days .... with the added brainfart that i just multiplied 28 by 2.
Updated so that:
Note it's now aligned with the measles outbreak recode Rmd.