v_compare: Compare two vectors

Description Usage Arguments Value Examples

View source: R/exploratory_data_analysis.R

Description

Obtaing coincident and not coincident elements between two vectors.

Usage

1
v_compare(vector_x, vector_y)

Arguments

vector_x

1st vector to compare

vector_y

2nd vector to compare

Value

Correlation index for all data input variable

Examples

1
2
3
4
5
6
v1=c("height","weight","age")
v2=c("height","weight","location","q_visits")
res=v_compare(vector_x=v1, vector_y=v2)
# Print the keys that didn't match
res
# Accessing the keys not present in

Example output

Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, units

funModeling v.1.7 :)
Examples and tutorials at livebook.datascienceheroes.com

Coincident in both: 2
Rows not present in X: 2
Rows not present in Y: 1
$present_in_both
[1] "height" "weight"

$rows_not_in_X
[1] "location" "q_visits"

$rows_not_in_Y
[1] "age"

funModeling documentation built on July 1, 2020, 5:40 p.m.