Description Usage Arguments Value Examples
Output a simpler (fewer columns) dataframe, given an input dataframe
made by either calc_TURN()
or calc_path_TURN()
functions.
New TURN column is returned, which is the the Y_prime_3wma input column, where
InstrumentVersion == 'all_adj'.
1 | clean_TURN_output(df, extra_cols = NULL, is_path = FALSE)
|
df |
dataframe with at least columns of "InstrumentVersion", "epi_n_days", "Y", "path_Y", "epidate", and any other columns included in group_vars. |
extra_cols |
character vector of additional columns to keep in output |
is_path |
logical, whether dataframe is of pathogen level data
(i.e. created in |
dataframe that includes TURN column (final normalization). It also includes path_TURN (the TURN for individual pathogens, when the is_path argument is TRUE)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ############## Generating data ################
national_list <- calc_TURN(TUR_dat, return_means = TRUE)
means <- national_list$means
# national TURN
TURN_national <- national_list$df
# calculate TURN for each pathogen -- national
path_turn_national <- calc_path_TURN(df = path_dat,
TURN_df = TURN_national,
means = means)
##### creating cleaner/simple dataframe #######
clean_TURN_output(TURN_national)
clean_TURN_output(path_turn_national, is_path = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.