Deprecated function framework for randomly sampling from a corpus or dfm object. Use
sample(x, size, replace = FALSE, prob = NULL, ...) # S3 method for default sample(x, size, replace = FALSE, prob = NULL, ...) # S3 method for corpus sample(x, ...) # S3 method for dfm sample(x, ...)
a corpus or dfm object whose documents or features will be sampled
a positive number, the number of documents to select
Should sampling be with replacement?
A vector of probability weights for obtaining the elements of the vector being sampled.