EPM_write_to_file | R Documentation |
Write a list of PubMed records to a local file. If already existing, the destination file will be over-written. Original formatting of the PubMed records should be declared and will be preserved in the output file. Format conversion is NOT supported.
EPM_write_to_file(x, to, format, addon = NULL, verbose = FALSE)
x |
List including raw PubMed records. |
to |
Path to the destination file on the local disc. |
format |
String, format of the raw PubMed records that will be saved to the destination file (e.g., 'xml'). |
addon |
String, optional chunk of text in XML format to be written to the destination file (header). This argument is only used when ‘format' is set to ’xml'. It can be NULL. |
verbose |
Logical, shall details about the progress of the operation be printed to console. |
integer in the range c(0, 1). A result of 0 indicates that an error occurred while writing the file. A result of 1 indicates that the operation was completed successfully.
Damiano Fantini, damiano.fantini@gmail.com
https://www.data-pulse.com/dev_site/easypubmed/
test <- list('Record #1', 'Record #2')
outfile = './test_file.txt'
file.exists(outfile)
easyPubMed:::EPM_write_to_file(x = test, to = './test_file.txt', format = 'xml')
file.exists(outfile)
readLines(outfile)
unlink(outfile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.