Learn R Programming

SemNetCleaner (version 1.1.5)

full.match: Wrapper Match Function

Description

A wrapper function that performs the same operations as match except accounts for NA

Usage

full.match(vec1, vec2)

Arguments

vec1

Vector. Must be same length as vec2

vec2

Vector. Must be same length as vec1

Value

Returns a vector the same length as the input vectors of TRUE and FALSE for each element across the vectors

Examples

Run this code
# NOT RUN {
# Vector 1
vec1 <- c(NA,NA,"cat","dog",NA,0,"porcupine")

# Vector 2
vec2 <- c(NA,"bob","alice","dog","prince",0,NA)

# Perform match
full.match(vec1, vec2)

# }

Run the code above in your browser using DataLab