export_notes | R Documentation |
Exports out the contents of a given cell per row into individual text files. Can be used to export out reports into individual text files for further analyses.
export_notes(d, folder, code, name1 = "ID_MERGE", name2)
d |
data.table, database containing notes loaded using the load_notes function. Theoretically any other data.table can be given and the contents of the specified cell will be exported into the corresponding files. In case of notes, it is advised to load them with format_orig = TRUE, as then the output will retain the original format of the report making it easier to read. |
folder |
string, full folder path to folder where the files should be exported. If folder does not exist, the function stops. |
code |
string vector, column name containing the data that should be exported. Generally should be "abc_rep_txt", where abc stands for the three letter abbreviation of the given type of note. |
name1 |
string, the first part of the file names. Defaults to ID_MERGE. |
name2 |
string, the second part of the file names. name1 and name2 will be separated using "_". Generally should be "abc_rep_num", where abc stands for the three letter abbreviation of the given type of note. |
NULL, files are exported to given folder.
## Not run:
#Output all cardiology notes to given folder
d <- load_notes("Car.txt", type = "car", nThread = 2, format_orig = TRUE)
export_notes(d, folder = "/Users/Test/Notes/", code = "car_rep_txt",
name1 = "ID_MERGE", name2 = "car_rep_num")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.