-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CRAN-MOD] modifications for CRAN pretests
- Loading branch information
Showing
15 changed files
with
180 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ | |
^pkgdown$ | ||
^\.github$ | ||
^README\.Rmd$ | ||
^CODE_OF_CONDUCT\.md$ | ||
^logo\.png$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,31 @@ | ||
Package: clintrialx | ||
Type: Package | ||
Title: Connect and work with clinical trials data sources with R programming. | ||
Title: Connect and Work with Clinical Trials Data Sources with R Programming | ||
Version: 0.1.0 | ||
Authors@R: person("Indraneel", "Chakraborty",, "hello.indraneel@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-6958-8269")) | ||
Authors@R: | ||
person("Indraneel", "Chakraborty",, "hello.indraneel@gmail.com", | ||
role = c("aut", "cre"), comment = c(ORCID = "0000-0001-6958-8269")) | ||
Maintainer: Indraneel Chakraborty <hello.indraneel@gmail.com> | ||
Description: Are you spending too much time fetching and managing clinical trial data? Struggling with complex queries and bulk data extraction? What if you could simplify this process with just a few lines of code? Introducing clintrialx - Fetch clinical trial data from sources like ClinicalTrials.gov and the CTTI AACT database with R, supporting pagination and bulk downloads. Also, you can generate html reports based on the data obtained from the sources! | ||
License: Apache License Version 2.0 | ||
Description: Are you spending too much time fetching and managing clinical trial data? Struggling with complex queries and bulk data extraction? What if you could simplify this process with just a few lines of code? Introducing clintrialx - Fetch clinical trial data from sources like ClinicalTrials.gov and the CTTI AACT database with R, supporting pagination and bulk downloads. Also, you can generate HTML reports based on the data obtained from the sources! | ||
License: Apache License 2.0 | file LICENSE | ||
Encoding: UTF-8 | ||
LazyData: true | ||
Depends: R (>= 4.0.0), httr, lubridate, readr, dplyr, progress, RPostgreSQL | ||
Depends: | ||
R (>= 4.0.0) | ||
Imports: | ||
httr, | ||
lubridate, | ||
readr, | ||
dplyr, | ||
progress, | ||
RPostgreSQL, | ||
tibble, | ||
DBI, | ||
rmarkdown | ||
Suggests: | ||
knitr | ||
VignetteBuilder: knitr | ||
RoxygenNote: 7.3.2 | ||
URL: http://ineelhere.github.io/clintrialx/ | ||
URL: http://www.indraneelchakraborty.com/clintrialx/ | ||
ExtraLicense: LICENSE | ||
ExtraFiles: CODE_OF_CONDUCT.md, logo.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,32 @@ | ||
exportPattern("^[[:alpha:]]+") | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(aact_check_connection) | ||
export(aact_connection) | ||
export(aact_custom_query) | ||
export(ctg_bulk_fetch) | ||
export(ctg_count) | ||
export(ctg_data_report) | ||
export(ctg_get_fields) | ||
export(ctg_get_nct) | ||
export(hello) | ||
export(version_info) | ||
import(DBI) | ||
import(RPostgreSQL) | ||
import(dplyr) | ||
import(httr) | ||
import(progress) | ||
import(readr) | ||
import(tibble) | ||
importFrom(dplyr,as_tibble) | ||
importFrom(dplyr,bind_rows) | ||
importFrom(grDevices,colorRampPalette) | ||
importFrom(httr,GET) | ||
importFrom(httr,content) | ||
importFrom(httr,status_code) | ||
importFrom(lubridate,ymd_hms) | ||
importFrom(progress,progress_bar) | ||
importFrom(readr,cols) | ||
importFrom(readr,read_csv) | ||
importFrom(rmarkdown,render) | ||
importFrom(utils,install.packages) | ||
importFrom(utils,installed.packages) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
## ----eval=FALSE--------------------------------------------------------------- | ||
# # Load required libraries | ||
# invisible(suppressPackageStartupMessages({ | ||
# library(clintrialx) # For fetching clinical trial data | ||
# library(ggplot2) # For data visualization | ||
# library(plotly) # For interactive plots | ||
# library(dplyr) # For data manipulation | ||
# library(lubridate) # For date handling | ||
# })) | ||
|
||
## ----eval=FALSE--------------------------------------------------------------- | ||
# # Fetch cancer study data in India | ||
# df <- ctg_bulk_fetch(condition = "cancer", location = "India") | ||
|
||
## ----eval=FALSE--------------------------------------------------------------- | ||
# # Create a table of study statuses | ||
# status_counts <- table(df$`Study Status`) | ||
# | ||
# # Convert the table to a data frame | ||
# status_df <- data.frame(status = names(status_counts), count = as.numeric(status_counts)) | ||
# | ||
# # Generate the bar plot | ||
# ggplotly(ggplot(status_df, aes(x = reorder(status, -count), y = count)) + | ||
# geom_bar(stat = "identity", fill = "orange") + | ||
# theme_minimal() + | ||
# labs(title = "Distribution of Study Statuses", | ||
# x = "Study Status", | ||
# y = "Count") + | ||
# theme(axis.text.x = element_text(angle = 45, hjust = 1)) + | ||
# geom_text(aes(label = count), vjust = -0.5)) | ||
|
||
## ----eval=FALSE--------------------------------------------------------------- | ||
# # Create an interactive box plot of enrollment by study phase | ||
# ggplotly(ggplot(df, aes(x = Phases, y = Enrollment)) + | ||
# geom_boxplot(fill = "lightblue", outlier.colour = "red", outlier.shape = 1) + | ||
# geom_jitter(color = "darkblue", size = 0.5, alpha = 0.5, width = 0.2) + | ||
# theme_minimal(base_size = 14) + | ||
# labs(title = "Enrollment by Study Phase", | ||
# x = "Study Phase", | ||
# y = "Enrollment") + | ||
# theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 12), | ||
# plot.title = element_text(hjust = 0.5))) | ||
|
||
## ----eval=FALSE--------------------------------------------------------------- | ||
# # Convert date strings to Date objects | ||
# df$start_date <- as.Date(df$`Start Date`, format = "%Y-%m-%d") | ||
# df$completion_date <- as.Date(df$`Completion Date`, format = "%Y-%m-%d") | ||
# | ||
# # Create a scatter plot with a horizontal line at 2024 | ||
# ggplot(df, aes(x = start_date, y = completion_date, color = `Study Status`)) + | ||
# geom_point(alpha = 0.6) + | ||
# geom_hline(yintercept = as.Date("2024-01-01"), linetype = "dashed", color = "blue") + | ||
# theme_minimal() + | ||
# labs(title = "Study Duration Timeline", | ||
# x = "Start Date", | ||
# y = "Completion Date") + | ||
# scale_color_brewer(palette = "Set1") | ||
|
||
## ----eval=FALSE--------------------------------------------------------------- | ||
# # Summarize and plot funding sources by study type | ||
# df_summary <- df %>% | ||
# count(`Funder Type`, `Study Type`) %>% | ||
# group_by(`Funder Type`) %>% | ||
# mutate(prop = n / sum(n)) | ||
# | ||
# ggplotly(ggplot(df_summary, aes(x = `Funder Type`, y = prop, fill = `Study Type`)) + | ||
# geom_bar(stat = "identity", position = "dodge") + | ||
# theme_minimal() + | ||
# labs(title = "Funding Sources and Study Types", | ||
# x = "Funder Type", | ||
# y = "Proportion") + | ||
# scale_fill_brewer(palette = "Set2") + | ||
# theme(axis.text.x = element_text(angle = 45, hjust = 1))) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters