aact_custom_query {clintrialx} | R Documentation |
Run a custom query
Description
Run a custom query
Usage
aact_custom_query(con, query)
Arguments
con |
Database connection object |
query |
SQL query string |
Value
A data frame with the query results
Examples
# 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)
[Package clintrialx version 0.1.0 Index]