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

population scaling with no matching names silently returns only NAs #248

Open
dsweber2 opened this issue Oct 9, 2023 · 0 comments
Open

Comments

@dsweber2
Copy link
Contributor

dsweber2 commented Oct 9, 2023

using e.g. this step

    preproc %<>% step_population_scaling(
      all_numeric(),
      df = state_census,
      df_pop_col = "pop",
      create_new = FALSE,
      rate_rescaling = 1e5,
      by = c("geo_value" = "abbr")
    )

with this "data"

constant <- as_epi_archive(tibble(
  geo_value = "g1",
  time_value = seq(as.Date("2012-01-01"), by = "day", length.out = 90),
  version = seq(as.Date("2012-01-01"), by = "day", length.out = 90),
  a = 25
))

is happily passed on to lm.fit, which then sees no data to fit on. Would probably be good to error out if there are columns in the dataset that aren't in df_pop_col.

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

No branches or pull requests

1 participant