| rd_export | R Documentation |
Export a query dataset (e.g., from rd_query or rd_event) to an .xlsx file. The function can optionally convert a column of URLs into Excel hyperlinks and apply password protection to the worksheet.
rd_export(
project = NULL,
queries = NULL,
column = NULL,
sheet_name = NULL,
path = NULL,
password = NULL
)
project |
A list containing the dataframe of queries and results (expected |
queries |
A data frame of identified queries. |
column |
Name of the column containing URLs to convert into hyperlinks. If |
sheet_name |
Name of the Excel sheet in the resulting |
path |
File path for saving the |
password |
Optional password to protect the worksheet from edits. |
An .xlsx file written to the specified path.
Other query functions:
check_queries(),
rd_event(),
rd_query()
if (requireNamespace("openxlsx", quietly = TRUE)) {
result <- rd_query(covican, variables = "age", expression = "x > 80")
rd_export(
result,
sheet_name = "My Queries",
path = file.path(tempdir(), "queries.xlsx")
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.