Skip to contents

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

if (FALSE) { # \dontrun{
# 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)
} # }