mismatch: Search for Elements in Vector2 Missing from vector2 and Vice...

View source: R/mismatch.R

mismatchR Documentation

Search for Elements in Vector2 Missing from vector2 and Vice Versa

Description

This function is intended to offer a quick visualisation of which elements are missing across two vectors.

Usage

mismatch(
  vector1,
  vector2,
  min_obs_for_csv = NULL,
  folder = "mismatch",
  treatment = as.character
)

Arguments

vector1

A vector for comparison with %in%. Geometry columns will be removed if vector originates in sf object.

vector2

As for vector1

min_obs_for_csv

If NULL, output only to console. An integer value indicates the minimum number of mismatched observations for the output to be stored in a file in the folder given below.

treatment

The coercing method for the vectors

Value

A tibble with the mismatches, including missing values.

Examples

mismatch(iris$Species, iris$Species)

# Currently gives one NA value if all correct.

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