name_freq_table: Functions to calculate empirical relative frequency of...

Description Usage Arguments Details Value

View source: R/name_freq.R

Description

Functions to calculate empirical relative frequency of observed name components. Used to infer the rarity of observed name patterns for matching.

Usage

1
name_freq_table(refdata, start = 1, end = 9999)

Arguments

refdata

Dataset from which to calculate name component frequencies; can be a precalculated lookup table or a raw vector of names (will add overhead to repeated computations)

start

initial index of name substring on which to get frequencies

end

final index of name substring on which to get frequencies

n

A string or vector of strings. Should be Chinese names.

log

logical: whether to return log relative frequency

Details

for each name, returns the relative frequency (or log relative frequency) of the specified substring in the reference data name_freq() returns relative frequencies of a list of names, given substrings name_freq_table() returns a lookup table for each name substring of the specified start and stop digits from reference data name_freq_compare() compares two lists of names given substrings and a lookup table

Value

An integer vector of the same length as n


OPTI-SURVEIL/chinsimi documentation built on Oct. 27, 2019, 7:05 p.m.