Learn R Programming

janitor (version 2.2.0)

get_one_to_one: Find the list of columns that have a 1:1 mapping to each other

Description

Find the list of columns that have a 1:1 mapping to each other

Usage

get_one_to_one(dat)

Value

A list with one element for each group of columns that map identically to each other.

Arguments

dat

A data.frame or similar object

Examples

Run this code
foo <- data.frame(
  Lab_Test_Long=c("Cholesterol, LDL", "Cholesterol, LDL", "Glucose"),
  Lab_Test_Short=c("CLDL", "CLDL", "GLUC"),
  LOINC=c(12345, 12345, 54321),
  Person=c("Sam", "Bill", "Sam"),
  stringsAsFactors=FALSE
)
get_one_to_one(foo)

Run the code above in your browser using DataLab