simulate.split: Simulate how 'split' work in 'hashed.model.matrix' to split...

View source: R/simulate.split.R

simulate.splitR Documentation

Simulate how split work in hashed.model.matrix to split the string into tokens

Description

Simulate how split work in hashed.model.matrix to split the string into tokens

Usage

simulate.split(x, delim = ",", type = c("existence", "count"))

Arguments

x

character vector or factor. The source of concatenated feature.

delim

character value. The string to use for splitting.

type

character value. Either "count" or "existence". "count" indicates the number of occurrence of the token. "existence" indicates the boolean that whether the token exist or not.

Value

integer vector for type = "count" and logical vector for type = "existence".


wush978/FeatureHashing documentation built on Oct. 23, 2022, 10:16 a.m.