Bootstrap_Vocab: An internal function for Bootstrap_Data_Frame.

View source: R/Personal_Functions.R

Bootstrap_VocabR Documentation

An internal function for Bootstrap_Data_Frame.

Description

This function takes a selection of documents and bootstraps words from said sentences until there are N total sentences (both sudo and original).

Usage

Bootstrap_Vocab(vocab, N, stopwds, min_length = 7, max_length = 15)

Arguments

vocab

The collection of documents to boostrap.

N

The total amount of sentences to end up with

stopwds

A list of stopwords to not include in the bootstrapping proccess

min_length

The shortest allowable bootstrapped doument

max_length

The longest allowable bootstrapped document

Details

The min and max length arguements to not gaurantee that a sentence will reach that length. These senteces will be nonsensical.

Value

A vector of bootstrapped sentences.

Author(s)

Travis Barton

Examples



testing_set = c(paste('this is test',  as.character(seq(1, 10, 1))))

Bootstrap_Vocab(testing_set, 20, c('this'))


Travis-Barton/LilRhino documentation built on May 3, 2022, 3:36 a.m.