Skip to content

Commit

Permalink
minor style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
njtierney committed Nov 30, 2022
1 parent e454936 commit 50ef110
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion R/add_population_age_to.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ add_population_age_to <- function(contact_data,
population = get_polymod_population()) {

# get function to interpolate population age distributions to 1y bins
age_population_function <- get_age_population_function(population)
age_population_function <- get_age_population_function(
population
)

# add the population in each 'to' age for the survey context
contact_data %>%
Expand Down
2 changes: 1 addition & 1 deletion R/aggregate_predicted_contacts.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ aggregate_predicted_contacts <- function(predicted_contacts_1y,
) %>%
# *average* the total contacts within the 'from' contacts, weighted by the
# population distribution (to get contacts for the population-average
# ember of that age group)
# member of that age group)
dplyr::mutate(
pop_age_from = age_population_function(age_from),
age_group_from = cut(
Expand Down

0 comments on commit 50ef110

Please sign in to comment.