Given a file returns the number of words for each document in the file. Assumes documents are delimited by newlines. If the file contains only one document then set fileflag arg to 1.
1 | rcpp_doccount(ipath, fileflag)
|
ipath |
A string specifying the path to the input file. |
fileflag |
An int, set to 1 if only one document per file, 0 if each document is on a newline. returns An int vector of the results. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.