find_st_name: Find the element containing state names

View source: R/misc.R

find_st_nameR Documentation

Find the element containing state names

Description

Find the element containing state names

Usage

find_st_name(obj, df_nm = "<your_object>")

Arguments

df

A dataframe with one or more columns containing Indian state names

Details

The function first checks if "ST_NAME" or "STATE" are present preferring always one of those two, and always in that order. Otherwise, it will search in character columns for those containing the word "Pradesh" (Hindi for "state" or "province").

Value

The name of the column as a string literal.


AltfunsMA/cptools documentation built on Aug. 7, 2022, 5:44 p.m.