prep_ref_directory: Prepare the Data for the Referral Directory

prep_ref_directoryR Documentation

Prepare the Data for the Referral Directory

Description

Creates a data frame of the referral directory of the State, which can be used to create other more stylistically appealing tables

Usage

prep_ref_directory(
  df,
  indices,
  serv.cols,
  servtyp.pattern,
  day.pattern,
  namelist
)

Arguments

df

The cleaned data from the State.

indices

A numeric vector of all the column indices that will be used to create the tabulation.

serv.cols

The columns that contain the interventions provided. Used either as an atomic vector with indices, a regular expression or the actual column names. by each category of service provider.

servtyp.pattern, day.pattern

A regular expression that represents the colnames of all those that represent the service category of a facility and the day it operates, respectively.

namelist

A named list with column names as follows:

  • orgname - Name of the organization.

  • orgphone - Phone number of the organization.

  • gbvcontact - Contact details of the GBV focal person.

In all instances, the value is the column name for that variable.

Value

A modified data frame containing the information required of the State's referral directory.


BroVic/raampGBV documentation built on Oct. 7, 2022, 11:06 p.m.