Nothing
### - - - - - - - - - - - - - - - - - -
### sample.textmatrix.R
### - - - - - - - - - - - - - - - - - -
### created 2006-07-31
sample.textmatrix <- function (textmatrix, samplesize, index.return=FALSE) {
if (!inherits(textmatrix, "textmatrix")) {
stop("[sample.textmatrix] ERROR: first argument not a textmatrix.");
}
filelist = colnames(textmatrix)
rnd_sample = sample(1:length(filelist), samplesize)
if (index.return) {
return(list(x=filelist[rnd_sample],ix=rnd_sample))
} else {
return(filelist[rnd_sample])
}
} # sample.textmatrix()
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.