R package to connect and interact with clinical trials data via the AACT
Install the package from GitHub using devtools
package
library(devtools)
install_github("ineelhere/aactr")
If you donβt have the devtools
package already please install it with install.packages("devtools")
Check if the package got installed by importing it
library(aactr)
Username
and Password
you created.π To connect to the AACT database, use the connect_aact()
function:
library(aactr)
conn <- aact_connect(username, password)
username
and password
should be the same as your AACT account.
π To quickly check if your AACT db connection is actually fetching data:
library(aactr)
check_connection(conn)
Note, we just used the conn
connection created earlier.
You should expect an output similar to -
study_type
1 Observational [Patient Registry]
2 Interventional
3 Expanded Access
4 <NA>
5 Observational
π To refer to AACT database schema and details
library(aactr)
get_schema()
π To run custom queries for fetching data from the AACT database
library(aactr)
get_query(
conn,
query = "
SELECT
nct_id,
source,
enrollment,
overall_status
FROM
studies
LIMIT
5;
"
)
You may define the query string outside the function call, store it in a variable and just pass it to the get_query()
function.
Expected output:
nct_id source enrollment overall_status
1 NCT05762861 University of Minho 200 Not yet recruiting
2 NCT02950012 BIO-CAT, Inc. 100 Completed
3 NCT05251298 University Hospital Muenster 370 Recruiting
4 NCT01376921 Merck KGaA, Darmstadt, Germany 300 Completed
5 NCT05237219 University of Pecs 0 Withdrawn
π A quick info reference
library(aactr)
info()
π‘ Got questions and/or suggestions? Please create an issue/PR on the GitHub repository: https://github.com/ineelhere/aactr
P.S. More features on the way! ___
**Β© Indraneel Chakraborty |
2024** π§βπ»LinkedIn | X/Twitter |