sampleData: sampleData

Description Usage Arguments Details Value Author(s)

View source: R/U06.sampleData.R

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


DataScienceSalon/predictifyR.3.0 documentation built on May 23, 2019, 8:25 p.m.