Skip to contents

Clean Field Names

Usage

clean_field_names(x)

Arguments

x

Data frame or other named object

Value

object with names in snakecase::to_lower_camel_case format

Examples


df <- data.frame("Sample ID" = 1:10, "Name" = "Fred", "Host Identification" = "Pinus strobus")

clean_field_names(df)
#>    sampleID name hostIdentification
#> 1         1 Fred      Pinus strobus
#> 2         2 Fred      Pinus strobus
#> 3         3 Fred      Pinus strobus
#> 4         4 Fred      Pinus strobus
#> 5         5 Fred      Pinus strobus
#> 6         6 Fred      Pinus strobus
#> 7         7 Fred      Pinus strobus
#> 8         8 Fred      Pinus strobus
#> 9         9 Fred      Pinus strobus
#> 10       10 Fred      Pinus strobus