View source: R/superspread_fill.R
| superspread_fill | R Documentation | 
Convert single-code column(s) into "multiple choice" formats, filling data from a target column
superspread_fill(df, tcol, select_helpers = everything(), target_col)
| df | Data frame to apply function to. | 
| tcol | Number of columns to create | 
| select_helpers | Use dplyr select helpers to apply function only to required columns. | 
| target_col | Target column to take values from, in order to fill the new columns Leave blank to include everything | 
library(dplyr)
library(magrittr)
data.frame(a=c(1,2,4,5,6,7,8),b=c(244,333,434,453,123,123,435)) %>%
 superspread_fill(8,"a","b")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.