check_legal_form: Check if Entities have the same legal form

Description Usage Arguments Value Examples

View source: R/OTHER_FUNCTIONS.R

Description

Check if Entities have the same legal form

Usage

1
check_legal_form(.tab, .tab_lf)

Arguments

.tab

A dataframe generated by match_names()

.tab_lf

A dataframe generated by make_legal_form_table()

Value

A dataframe with one additional column: same_legal_form

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
.path <- system.file("extdata", "test_tables.xlsx", package = "RFirmMatch")
.tab1 <- openxlsx::read.xlsx(.path, 1)
.tab1 <- .tab1 %>% prepare_tables() %>% extract_legal_form(make_legal_form_table())

.tab2 <- openxlsx::read.xlsx(.path, 2)
.tab2 <- .tab2 %>% prepare_tables() %>% extract_legal_form(make_legal_form_table())

.tab <- match_name(.tab1, .tab2, name_clean, "full")
.tab_lf <- make_legal_form_table()

check_legal_form(.tab, .tab_lf)

rm(.tab, .tab_lf)

MatthiasUckert/RFirmMatch documentation built on Dec. 17, 2021, 3:18 a.m.