get_province_of_institution: Helper Function to match and get province of target...

View source: R/fun-get-province-of-institution.R

get_province_of_institutionR Documentation

Helper Function to match and get province of target institution

Description

Helper Function to match and get province of target institution

Usage

get_province_of_institution(df, target_institution, target_province)

Arguments

df

data frame, contains the target institution column

target_institution

character, the column name of target institution

target_province

character, the target output column name for province variable.

Value

out

Examples

library(magrittr)
utils::data("PubObsStation",package = "techme")
tbl_read <- PubObsStation %>%
  dplyr::select(-province)

tbl_out <- get_province_of_institution(df = tbl_read,
  target_institution ="institution",
  target_province = "province")

head(tbl_out)

huhuaping/techme documentation built on June 16, 2024, 3:38 a.m.