Learn R Programming

arealDB (version 0.3.9)

matchVars: Determine the valid ID of variables

Description

This function matches the values of a variable with an index and returns the specified IDs.

Usage

matchVars(input = NULL, source = NULL, ...)

Arguments

input

[character(.)] table in which to match variables.

source

[integerish(1)] the census ID (cenID) from which the terms have been taken.

...

[list(1)] lists that capture the variables by which to match and the new column names containing the resulting ID; see Details.

Value

The table provided in input, where the given variable is replaced by the column that is specified by the argument name.

Details

Arguments in ... are named lists that indicate with which target column variables shall be matched and which value should be used as target ID.

targetID = list(variable = targetColumn)

The variable must be present as column in input and a table that is named "id_VARIABLE.csv" must be available in the root directory of the project. This should have been created with setVariables.