Description Usage Arguments Examples
Reshape Semi-Wide MSD
1 2 3 4 5 6 | reshape_msd(
df,
direction = c("long", "wide", "semi-wide", "quarters"),
clean = TRUE,
qtrs_keep_cumulative = FALSE
)
|
df |
MSD dataset in the semi-wide format |
direction |
direction of reshape, "long" (default), "wide" (original MSD structure), "semi-wide" (one column for targets, cumulative, results) or "quarters" (quarters pivoted, but not targets - useful for quarterly achievement)) |
clean |
clean period for graphing, eg(fy2019qtr2 -> FY19Q2) and create a period type (targets, results, cumulative) |
qtrs_keep_cumulative |
whether to keep the cumulative column when using quaters for direction, default = FALSE |
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
#read in data
df_genie <- match_msd("~/Downloads/PEPFAR-Data-Genie-PSNUByIMs-2018-08-15.zip")
#reshape long
df_genie_long <- reshape_msd(df_genie)
#reshape wide (to look like old format)
df_genie_long <- reshape_msd(df_genie, direction = "wide")
#reshape semi-wide (one column for targets, cumulative, results)
df_genie_wide <- reshape_msd(df_genie, direction = "semi-wide")
#reshape quarters (quarters pivoted, but not targets - useful for quarterly achievement)
df_genie_wide <- reshape_msd(df_genie, direction = "semi-wide")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.