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

Simplify and generalise get_exposure_ages #70

Open
ben18785 opened this issue Jun 16, 2023 · 1 comment
Open

Simplify and generalise get_exposure_ages #70

ben18785 opened this issue Jun 16, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ben18785
Copy link
Collaborator

As I understand it, get_exposure_ages just generates the ages of individuals within a serological sample. At the moment, it does the following:

  • determines the minimum birth year in the sample via min(serodata$birthyear)
  • determines the survey year by looking at the first row of the serodata and subtracting 1
  • creates a vector of ages from the minimum birth year to the year before the survey

But what if the data a user supplies does not have samples for all ages? Also, the requirements on the user are somewhat implicit, as the data frame needs to have columns named in a certain way. I'd propose changing this to:

create_exposure_ages <- function(birthyears, survey_year)

where birthyears is a vector of birth years.

@ekamau
Copy link
Collaborator

ekamau commented Jun 21, 2023

what if the user has data as age and not birth year ... is that step skipped?
or should the user calculate birth year, externally?

@ntorresd ntorresd added enhancement New feature or request fix labels Jul 31, 2023
@ntorresd ntorresd self-assigned this Jul 31, 2023
@ntorresd ntorresd removed the fix label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants