check_cost_defined: Check whether there's missing characters in the cost matrix.

View source: R/RcppExports.R

check_cost_definedR Documentation

Check whether there's missing characters in the cost matrix.

Description

Check whether there's missing characters in the cost matrix and return the missing characters.

Usage

check_cost_defined(data, cost_mat, delim = "")

Arguments

data

DataFrame to be computed.

cost_mat

Cost matrix to be checked.

delim

The delimiter separating atomic symbols.

Value

A string vector containing the missing characters, empty indicating there's no missing characters.

Examples

df <- as.data.frame(rbind(a=c("a_bc_d","d_bc_a"),b=c("b_bc_d","d_bc_a")))
cost.mat <- data.frame()
chars.not.found <- check_cost_defined(df, cost.mat, "_")

lingdist documentation built on Oct. 13, 2023, 1:16 a.m.