aact_custom_query | R Documentation |
Run a custom query
aact_custom_query(con, query)
con |
Database connection object |
query |
SQL query string |
A data frame with the query results
## Not run:
# Set environment variables for database credentials in .Renviron and load it
# readRenviron(".Renviron")
# Connect to the database
con <- aact_connection(Sys.getenv('user'), Sys.getenv('password'))
# Run a custom query
query <- "SELECT nct_id, source, enrollment, overall_status FROM studies LIMIT 5;"
results <- aact_custom_query(con, query)
# Print the results
print(results)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.