con_dedup: Deduplicate Concepts

Description Usage Arguments Value Examples

Description

This function checks if two concepts in the dataframe contain exactly the same terms and keeps only one of the concepts

Usage

1
con_dedup(df, col.term, col.conid)

Arguments

df

A dataframe containing terms and corresponding concept ids

col.term

The name of the column containing the terms as character string

col.conid

The name of the column containing the concept ids as character string

Value

A list containing (a) the adjusted dataframe, (b) the removed concepts and c() the adjustment matrix

Examples

1
2
3
4
5
6
library(tpfuns)
test <- tibble::tibble(
con_id = c( 1,   1,   1,   2,   2,   3,   3,   4,   4 ,  5,   5,   5,   6,   6 ),
term   = c("a", "c", "b", "a", "b", "d", "e", "e", "f", "e", "f", "g", "b", "a"))

con_dedup(test, "term", "con_id")

M-U-UNI-MA/tpfunctions documentation built on May 24, 2019, 7:37 a.m.