save_results | R Documentation |
This function saves search results to a file.
save_results(results, file_path, format = c("csv", "rds", "xlsx"))
results |
A data frame containing search results. |
file_path |
File path to save the results. Must be specified by user. |
format |
File format to use. One of "csv", "rds", or "xlsx". |
The file path (invisibly).
# Create sample results
results <- data.frame(
pmid = c("12345", "67890"),
title = c("Sample Title 1", "Sample Title 2"),
abstract = c("Sample abstract 1", "Sample abstract 2")
)
# Save to temporary directory
temp_file <- file.path(tempdir(), "results.csv")
save_results(results, temp_file, format = "csv")
# Clean up
unlink(temp_file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.