R/data-frame-metadata.R
headstart_utilities.Rd
These functions are used during the execution of a program. Rather they produce snippets that can be pasted into code, and help the developer avoid some typing.
column_rename_headstart( d, try_snake_case=TRUE, use_nse=TRUE )
column_class_headstart( d )
column_value_headstart( x )
Prints formatted code to the console.
column_rename_headstart(datasets::OrchardSprays)
#> dplyr::select( # `dplyr::select()` drops columns not included.
#> decrease = `decrease`,
#> rowpos = `rowpos`,
#> colpos = `colpos`,
#> treatment = `treatment`,
#> )
column_rename_headstart(datasets::iris)
#> dplyr::select( # `dplyr::select()` drops columns not included.
#> sepal_length = `Sepal.Length`,
#> sepal_width = `Sepal.Width`,
#> petal_length = `Petal.Length`,
#> petal_width = `Petal.Width`,
#> species = `Species`,
#> )
column_class_headstart(datasets::OrchardSprays)
#> , "decrease" = "numeric"
#> , "rowpos" = "numeric"
#> , "colpos" = "numeric"
#> , "treatment" = "factor"
column_value_headstart(datasets::OrchardSprays$treatment)
#> , "A" = "A"
#> , "B" = "B"
#> , "C" = "C"
#> , "D" = "D"
#> , "E" = "E"
#> , "F" = "F"
#> , "G" = "G"
#> , "H" = "H"