View source: R/CleanColumnNames.R
clean_column_names | R Documentation |
A single functions to shorten and clean all RHoMIS column names.
clean_column_names(column_names)
column_names |
A list of all of the column names |
Rpackage file: CleanColumnNames.R
A cleaned list of all of the column names
repeat_columns <- c(
"crop_repeat",
"livestock_repeat",
"offfarm_repeat",
"hh_rep"
)
seperator <- "/"
column_names <- c(
"xxx/crop_repeat[1]/crop_name",
"xxx/livestock_repeat[2]/livestock_name",
"xxx/crop_repeat[3]/crop_name",
"xx/crop_repeat/crop_name",
"x/offfarm_repeat[4]/offfarm_name",
"y/hh_rep[5]/person_name",
"z/crop_repeat/crop_name"
)
# Will return:
# c("crop_name_1",
# "livestock_name_2",
# "crop_name_3",
# "crop_name",
# "offfarm_name_4",
# "person_name_5",
# "crop_name")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.