Harmonizr: Harmonizr

Description Usage Arguments Value Author(s) Examples

Description

Check whether the input field(column) names vector has all mandatory fileds or not

Usage

1
2
is_consistent(input_field_names_vector, mandatory_fields_vector,
  case_sensitive_check = TRUE, sequence_check = FALSE)

Arguments

input_field_names_vector

vector of field names extracted from dataframe, list or vector

mandatory_fields_vector

vector of mandatory fields

case_sensitive_check

'TRUE' to keep the case sensitive check on while matching the input fields with the mandatory fields

sequence_check

'TRUE' to check if the order of input fileds is exactly same as mandatory fields

Value

returns TRUE if the input_field_names_vector has all mandatory_fields_vector else FALSE

Author(s)

Abhinandan Satpute

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
input_fields <- c("platform", "process", "Site", "Product", "Year")
reference_fields <- c("Platform", "Process", "Site", "Product")

consistency_status <- is_consistent(input_fields, reference_fields, case_sensitive_check = FALSE)
consistency_status
TRUE

consistency_status <- is_consistent(input_fields, reference_fields)
consistency_status
FALSE

is_consistent(input_fields, reference_fields, case_sensitive_check = FALSE, sequence_check = TRUE)
FALSE

Abhinandan81/homogenizr documentation built on May 21, 2019, 1:19 p.m.