pivot_for_csv | R Documentation |
Data frames in tidy format should be pivoted to wide-by-year data frames for saving as .csv files. This function does that pivoting.
pivot_for_csv(.df, val_cols, year_col = Recca::psut_cols$year, var_col = "var")
.df |
The data frame to be pivoted. |
val_cols |
Data columns to be swapped to the |
year_col |
The string name of the year column.
Default is |
var_col |
The name of the resulting variable name column. Default is "var". |
The pivoted data frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.