shorten_individual_column_name: This script includes a series of functions which can be used...

View source: R/CleanColumnNames.R

shorten_individual_column_nameR Documentation

This script includes a series of functions which can be used to help clean column names of data collected with RHoMIS. Shorten Individual Name

Description

Used to abbreviate a single column name based on its last value. Typical RHoMIS column names come in the form "xxxx/xxxxx/xxxxx/important_name". This function helps to extract only the final value "important name".

Usage

shorten_individual_column_name(column_name, seperator)

Arguments

column_name

The specific item which needs shortening

seperator

The character separating parts of the item

Details

Rpackage file: CleanColumnNames.R

Value

Shortened string of the essential column name

Examples


long_name <- "xxxx/xxxxx/xxxxx/important_name"
shortened_name <- shorten_individual_column_name(
  column_name = long_name,
  seperator = "/"
)
# Shortened name will be equal "important_name"

l-gorman/rhomis-R-package documentation built on Nov. 8, 2023, 6:46 a.m.