cbs_mult: Profile Based Standardization (cbs)

Description Usage Arguments Value Examples

View source: R/measures.R

Description

Profile Based Standardization (cbs)

Usage

1
cbs_mult(table, clus = NULL)

Arguments

table

A dataframe with 4 columns (columns need to be in the right order)
column 1: A document identifier
column 2: The concept id
column 3: A term identifier
column 4: The term frequency

clus

Number of cores to be used

Value

A dataframe with showing the cbs for each unique firm-pair for each concept

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library (RFtex)

table <- tibble::tibble(
doc_id = c(1,1,1,1,1,2,2,2,2,3,3,3,3),
con_id = c(1,1,2,2,2,1,1,3,3,1,3,2,3),
term   = c("a", "b", "c", "d", "e", "a", "b", "f", "g", "a", "f", "e", "g"),
freq   = c(21,12,58,32,14,21,14,66,14,12,85,100,12))

cbs_mult(table)
clus <- parallel::makeCluster(getOption("cl.cores", 3))
cbs_mult(table, clus = clus)

M2UCT/RFtex documentation built on May 25, 2019, 4 a.m.