sampleData: sampleData

Description Usage Arguments Details Value Author(s)

Description

sampleData Returns samples from a corpus document

Usage

1
sampleData(document, numChunks, chunkSize, format = "lv")

Arguments

document

Vector containing a text document

numChunks

Integer indicating number of chunks or samples to return

chunkSize

Integer indicating the size chunk/sample size in percent or number of tokens

format

- format of the data to be returned values are: lv = list of character vectors ls = list of character strings v = unlisted character vector s = unlist character string

Details

This function takes as its parameters, a document in unlisted tokenized format, the number of chunks, the chunk size, and the format of the returned document, then returns a sample document according to parameters.

Value

samples - the samples in a contiguous vector of tokens

Author(s)

John James


j2scode/predictifyR documentation built on May 14, 2019, 10:34 a.m.