Description Usage Arguments Value Author(s) See Also
Analyses free text using the Freetext Matching Algorithm. The text to analyse can be in a file or an R object; if it is R it is written to a temporary file and analysed using a system call. The Freetext Matching Algorithm itself is a compiled Visual Basic 6.0 program; the system command to run the program must be specified in the option 'CALIBERfma_command'. This can be done using the function downloadFMA
, which downloads the latest version from GitHub, or the demo script.
1 2 3 4 5 6 |
freetext |
a string (character vector of length 1) containing a single free text record to analyse in debug mode.
If |
medcode |
a single integer of a medcode associated with |
infile |
either a string stating the file path of the text to analyse, or a data.frame containing columns pracid (integer), textid (integer), text (character) in that order. If a text file, it must be tab-delimited with no column headers and columns in the order pracid, textid, text, and Windows-style line endings (carriage return and linefeed). |
outfile |
output file path. If NULL, the output structured data are returned as a data.table. |
medcodefile |
either a string stating the file path of the medcodes associated with infile, or data.frame containing columns pracid (integer), textid (integer), medcode (integer). If a text file, it must be comma separated with column headers pracid, textid, text. It must have Windows-style line endings. |
logfile |
file path for log file. If NULL, the log file is printed to screen. |
fmadir_R |
folder location of FMA program and lookup tables, in Unix / R format |
fmadir_win |
folder location of FMA program and lookup tables, in Wine format for Windows programs to use |
If outfile is NULL, a fmaTest
object containing the results of analysis is returned.
Anoop Shah
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.