jca_conc: Drive the concordancer

Description Usage Arguments Details Value

View source: R/rjca.R


Drive the concordancer and return the concordance as a data.frame. See details for possible extra arguments.





a list of file and folder names


extra arguments to control the process. See Details.


Possible extra arguments are

Either dictionary or pattern must be provided. If dictionary is provided then category may also be provided. If it is not then the concordance is of all the patterns anywhere in the dictionary.

This function also dumps the location of the temporary folder where the results landed to standard error in case you want the original html data file from which the data.frame was extracted.

When the prettyprint option is FALSE the returned data.frame has three columns. The first is the document from which the collocation line occurs 'Document', the second is the left hand side of the collocation 'LHS' (the window words leading up to the pattern match), and the third is the pattern match and the window words succeeding it 'Match.RHS'. Choose this option if e.g. you want to sort the data.frame by match rather than by document, the default. If you just want to look at the results aligned on the match then the default TRUE setting will be fine. Then the columns will be 'Document' and 'Concordance'.

Note that you can also view the original webpage from which this function scrapes the data.frame. It is in the folder that the function names and is called 'concordance.html'. If you set open.browser to TRUE then R will attempt to open this file in a web browser.

Note: Concordances can get big but this function does not try to be efficient.


a data.frame containing

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