jca_line: Drive the single liner

Description Usage Arguments Details

View source: R/rjca.R


Puts a set of documents into a single file in one of the ways Mallet likes. This function creates lines of the form


jca_line(files, filename, ...)



a list of file and folder names


the single file you want the contents of files in


extra arguments to control the process. See Details.


folder-name | NoLabel tab filename tab file contents...

This is the format called 'one instance per file' on the Mallet pages (http://mallet.cs.umass.edu/import.php). If you provide folder names to the files argument the first line element will be the folder name and the second element will be the names of file within it. If you provide filenames individually then the first line element will be 'NoLabel' and the second element will be the filename. You can mix these.

Note that you cannot provide folders of folders of files. The function looks for files and folders in files. For each of the folders it looks for files and adds them. Then it stops looking. Also, files or folders with names beginning with '.' will be ignored.

Optional arguments are

conjugateprior/rjca documentation built on May 13, 2019, 10:50 p.m.