You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error in `stop_bad_type()`:
! Result 3 must be a single string, not a character vector of length 2
Run `rlang::last_error()` to see where the error occurred.
Backtrace:
1: stop(fallback)
2: signal_abort(cnd, .file)
3: abort(message, x = x, expected = expected, actual = actual, what = what,
4: stop_bad_type(x, expected, actual = actual, what = what, arg = arg,
5: stop_bad_vector(x, expected_ptype, expected_length, what = what,
6: purrr:::stop_bad_element_vector(c("county_code", "another_key"
7: purrr::map_chr(mold$extras$roles[molded_names %in% keys], names)
8: epi_keys_mold(mold)
9: grab_forged_keys(components$forged, components$mold, new_data)
10: predict.epi_workflow(wf1, ex1)
11: stats::predict(wf1, ex1)
Creating this issue to track. I will implement this in my vignette PR (TODO mgyliu: link the PR)
Related to epiprocess issue cmu-delphi/epiprocess#182
Action items
epi_keys_mold
handles multipleother_keys
inepi_df
metadataThe problem
When the metadata for an
epi_df
looks like thiscalling
predict
fails inepi_keys_mold
because of thepurrr::map_chr
line.map_chr
doesn't like thatother_keys
has a nested list in it.Example to replicate
The last line spits out this error:
The fix
The fix is to replace the last 2 lines with
The text was updated successfully, but these errors were encountered: