From a6f900f5296dd034b5300250cae93649db89fe61 Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Wed, 21 Aug 2024 09:11:42 +0530 Subject: [PATCH 01/13] [ADD] updated description --- DESCRIPTION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e999aea..67f9e57 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -4,10 +4,10 @@ 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")) Maintainer: Indraneel Chakraborty -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! +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 Encoding: UTF-8 LazyData: true -Depends: R (>= 4.0.0), httr, lubridate, readr, dplyr, progress,RPostgreSQL +Depends: R (>= 4.0.0), httr, lubridate, readr, dplyr, progress, RPostgreSQL RoxygenNote: 7.3.2 URL: http://ineelhere.github.io/clintrialx/ From 82c2c277425453d00ecb52a0f3e5f7911f8d5669 Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Thu, 22 Aug 2024 10:38:06 +0530 Subject: [PATCH 02/13] [CRAN-MOD] modifications for CRAN pretests --- R/aact_query.R | 11 ++++++++++- R/ctg_bulk_fetch.R | 2 +- R/ctg_data_report.R | 10 ++++++---- R/hello.R | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/R/aact_query.R b/R/aact_query.R index 0d1fa61..e07d2ea 100644 --- a/R/aact_query.R +++ b/R/aact_query.R @@ -3,12 +3,16 @@ #' @param user Database username #' @param password Database password #' @return A connection object to the AACT database +#' @import DBI +#' @import RPostgreSQL #' @examples +#' \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')) +#' } #' @export aact_connection <- function(user, password) { con <- dbConnect( @@ -26,7 +30,9 @@ aact_connection <- function(user, password) { #' #' @param con Database connection object #' @return A data frame with distinct study types +#' @import DBI #' @examples +#' \dontrun{ #' # Set environment variables for database credentials in .Renviron and load it #' # readRenviron(".Renviron") #' @@ -35,6 +41,7 @@ aact_connection <- function(user, password) { #' #' # Check the connection #' aact_check_connection(con) +#' } #' @export aact_check_connection <- function(con) { df <- dbGetQuery(con, "select distinct study_type from studies") @@ -49,8 +56,9 @@ aact_check_connection <- function(con) { #' @param con Database connection object #' @param query SQL query string #' @return A data frame with the query results -#' Check database schema here - https://aact.ctti-clinicaltrials.org/documentation/aact_schema.png +#' @import DBI #' @examples +#' \dontrun{ #' # Set environment variables for database credentials in .Renviron and load it #' # readRenviron(".Renviron") #' @@ -63,6 +71,7 @@ aact_check_connection <- function(con) { #' #' # Print the results #' print(results) +#' } #' @export aact_custom_query <- function(con, query) { df <- dbGetQuery(con, query) diff --git a/R/ctg_bulk_fetch.R b/R/ctg_bulk_fetch.R index 8028374..301d4b9 100644 --- a/R/ctg_bulk_fetch.R +++ b/R/ctg_bulk_fetch.R @@ -104,7 +104,7 @@ get_total_count <- function(base_url, query_params) { create_progress_bar <- function(total_pages) { progress::progress_bar$new( - format = "Fetching Page :current/:total :spin :bar Completed :percent πŸ•’ :elapsedfull ", + format = "Fetching Page :current/:total :spin :bar Completed :percent :elapsedfull ", total = total_pages, clear = FALSE, width = 80 diff --git a/R/ctg_data_report.R b/R/ctg_data_report.R index cf229a7..64dba7d 100644 --- a/R/ctg_data_report.R +++ b/R/ctg_data_report.R @@ -5,7 +5,7 @@ #' It automates the process of data analysis and visualization, providing insights into various #' aspects of clinical trials such as study status, enrollment, duration, and funding sources. #' -#' Visit here for an example report - \url{https://ineelhere.github.io/clintrialx/report.html}. +#' Visit here for an example report - \url{https://www.indraneelchakraborty.com/clintrialx/report.html}. #' @param ctg_data A data frame containing clinical trial data. Required columns include: #' \itemize{ #' \item \code{Study Status}: Current status of each study (e.g., \code{"Completed"}, \code{"Ongoing"}) @@ -113,8 +113,10 @@ #' } #' #' @seealso -#' \url{https://ineelhere.github.io/clintrialx} for more information about the ClinTrialX package. -#' +#' \url{https://www.indraneelchakraborty.com/clintrialx} for more information about the ClinTrialX package. +#' @importFrom grDevices colorRampPalette +#' @importFrom utils install.packages installed.packages +#' @importFrom rmarkdown render #' @export ctg_data_report <- function(ctg_data, title = "Clinical Trial Data Report", @@ -198,7 +200,7 @@ ctg_data_report <- function(ctg_data, footer_content <- if (!is.null(custom_footer)) { paste0('\n\n\n') } else { - '\n\n\n' + '\n\n\n' } # Write the Rmd content dynamically diff --git a/R/hello.R b/R/hello.R index 240bd57..b0a8eb8 100644 --- a/R/hello.R +++ b/R/hello.R @@ -7,7 +7,7 @@ #' @examples #' hello() hello <- function() { - message <- "πŸ‘‹ Welcome to ClinTrialX!" + message <- "Welcome to ClinTrialX!" Encoding(message) <- "UTF-8" print(message) } From 6ddb1e47881639c6339954379182e3b7e0e3f8f0 Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Thu, 22 Aug 2024 10:38:33 +0530 Subject: [PATCH 03/13] [CRAN-MOD] modifications for CRAN pretests --- .Rbuildignore | 2 + DESCRIPTION | 30 ++++++++++--- NAMESPACE | 33 +++++++++++++- README.Rmd | 4 +- README.md | 4 +- _pkgdown.yml | 2 +- clintrialx.Rproj | 2 + man/aact_check_connection.Rd | 2 + man/aact_connection.Rd | 2 + man/aact_custom_query.Rd | 3 +- man/ctg_data_report.Rd | 4 +- tests/testthat/test-aact_query.R | 21 +++++++++ tests/testthat/test-hello.R | 2 +- vignettes/usecase-doc.R | 74 ++++++++++++++++++++++++++++++++ vignettes/usecase-doc.Rmd | 23 +++++----- 15 files changed, 180 insertions(+), 28 deletions(-) create mode 100644 vignettes/usecase-doc.R diff --git a/.Rbuildignore b/.Rbuildignore index 29cc3f0..aac34fe 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -7,3 +7,5 @@ ^pkgdown$ ^\.github$ ^README\.Rmd$ +^CODE_OF_CONDUCT\.md$ +^logo\.png$ diff --git a/DESCRIPTION b/DESCRIPTION index 67f9e57..3cd3bec 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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 -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 diff --git a/NAMESPACE b/NAMESPACE index d75f824..ba03186 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -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) diff --git a/README.Rmd b/README.Rmd index 1edc9e4..16c96a5 100644 --- a/README.Rmd +++ b/README.Rmd @@ -23,7 +23,7 @@ knitr::opts_chunk$set( [![R-CMD-check](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml) [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) -[![pkgdown](https://img.shields.io/badge/pkgdown-docs-blue.svg)](https://ineelhere.github.io/clintrialx/) +[![pkgdown](https://img.shields.io/badge/pkgdown-docs-blue.svg)](https://www.indraneelchakraborty.com/clintrialx/) [![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Fineelhere%2Fclintrialx&label=Visitors&labelColor=%23f47373&countColor=%2337d67a&style=flat&labelStyle=upper)](https://github.com/ineelhere/clintrialx) [![Data Sources: @@ -146,7 +146,7 @@ print(results) ## Trial Data HTML Reports *Currently works for data from ClinicalTrials.Gov* -Visit here for an exqample report - https://ineelhere.github.io/clintrialx/report.html +Visit here for an exqample report - https://www.indraneelchakraborty.com/clintrialx/report.html ```{r example6, eval = FALSE} #first get the data in a R dataframe my_clinical_trial_data <- ctg_bulk_fetch(condition="cancer") diff --git a/README.md b/README.md index f2fb904..c05933d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ [![R-CMD-check](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml) [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) -[![pkgdown](https://img.shields.io/badge/pkgdown-docs-blue.svg)](https://ineelhere.github.io/clintrialx/) +[![pkgdown](https://img.shields.io/badge/pkgdown-docs-blue.svg)](https://www.indraneelchakraborty.com/clintrialx/) [![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Fineelhere%2Fclintrialx&label=Visitors&labelColor=%23f47373&countColor=%2337d67a&style=flat&labelStyle=upper)](https://github.com/ineelhere/clintrialx) [![Data Sources: @@ -130,7 +130,7 @@ print(results) *Currently works for data from ClinicalTrials.Gov* Visit here for an exqample report - - + ``` r #first get the data in a R dataframe diff --git a/_pkgdown.yml b/_pkgdown.yml index 8815635..12d5360 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,4 +1,4 @@ -url: http://ineelhere.github.io/clintrialx/ +url: http://www.indraneelchakraborty.com/clintrialx/ template: bootstrap: 5 diff --git a/clintrialx.Rproj b/clintrialx.Rproj index 497f8bf..e5c3f7c 100644 --- a/clintrialx.Rproj +++ b/clintrialx.Rproj @@ -18,3 +18,5 @@ StripTrailingWhitespace: Yes BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source +PackageCheckArgs: --as-cran +PackageRoxygenize: rd,collate,namespace,vignette diff --git a/man/aact_check_connection.Rd b/man/aact_check_connection.Rd index 002063e..2d9474c 100644 --- a/man/aact_check_connection.Rd +++ b/man/aact_check_connection.Rd @@ -16,6 +16,7 @@ A data frame with distinct study types Check database connection } \examples{ +\dontrun{ # Set environment variables for database credentials in .Renviron and load it # readRenviron(".Renviron") @@ -25,3 +26,4 @@ con <- aact_connection(Sys.getenv('user'), Sys.getenv('password')) # Check the connection aact_check_connection(con) } +} diff --git a/man/aact_connection.Rd b/man/aact_connection.Rd index 11c3e02..dc3eded 100644 --- a/man/aact_connection.Rd +++ b/man/aact_connection.Rd @@ -18,9 +18,11 @@ A connection object to the AACT database Connect to AACT PostgreSQL database } \examples{ +\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')) } +} diff --git a/man/aact_custom_query.Rd b/man/aact_custom_query.Rd index f4dfed5..cfde632 100644 --- a/man/aact_custom_query.Rd +++ b/man/aact_custom_query.Rd @@ -13,12 +13,12 @@ aact_custom_query(con, query) } \value{ A data frame with the query results -Check database schema here - https://aact.ctti-clinicaltrials.org/documentation/aact_schema.png } \description{ Run a custom query } \examples{ +\dontrun{ # Set environment variables for database credentials in .Renviron and load it # readRenviron(".Renviron") @@ -32,3 +32,4 @@ results <- aact_custom_query(con, query) # Print the results print(results) } +} diff --git a/man/ctg_data_report.Rd b/man/ctg_data_report.Rd index 09c5810..3087ea4 100644 --- a/man/ctg_data_report.Rd +++ b/man/ctg_data_report.Rd @@ -63,7 +63,7 @@ This function creates a detailed, visually appealing HTML report from clinical t It automates the process of data analysis and visualization, providing insights into various aspects of clinical trials such as study status, enrollment, duration, and funding sources. -Click here for an example report - \url{https://ineelhere.github.io/clintrialx/report.html}{report.html}. +Visit here for an example report - \url{https://www.indraneelchakraborty.com/clintrialx/report.html}. } \details{ The function performs these key steps: @@ -143,5 +143,5 @@ ctg_data_report( } \seealso{ -\url{https://ineelhere.github.io/clintrialx} for more information about the ClinTrialX package. +\url{https://www.indraneelchakraborty.com/clintrialx} for more information about the ClinTrialX package. } diff --git a/tests/testthat/test-aact_query.R b/tests/testthat/test-aact_query.R index fec18cc..f886ed5 100644 --- a/tests/testthat/test-aact_query.R +++ b/tests/testthat/test-aact_query.R @@ -1,9 +1,16 @@ # Test for aact_connection function test_that("aact_connection function works correctly", { + skip_on_cran() # Skip on CRAN + # Mock credentials user <- Sys.getenv('user') password <- Sys.getenv('password') + # Skip if credentials are not set + if (user == "" || password == "") { + skip("Database credentials are not set in the environment.") + } + # Test connection con <- aact_connection(user, password) @@ -16,10 +23,17 @@ test_that("aact_connection function works correctly", { # Test for aact_check_connection function test_that("aact_check_connection function works correctly", { + skip_on_cran() # Skip on CRAN + # Mock credentials user <- Sys.getenv('user') password <- Sys.getenv('password') + # Skip if credentials are not set + if (user == "" || password == "") { + skip("Database credentials are not set in the environment.") + } + # Establish connection con <- aact_connection(user, password) @@ -38,10 +52,17 @@ test_that("aact_check_connection function works correctly", { # Test for aact_custom_query function test_that("aact_custom_query function works correctly", { + skip_on_cran() # Skip on CRAN + # Mock credentials user <- Sys.getenv('user') password <- Sys.getenv('password') + # Skip if credentials are not set + if (user == "" || password == "") { + skip("Database credentials are not set in the environment.") + } + # Establish connection con <- aact_connection(user, password) diff --git a/tests/testthat/test-hello.R b/tests/testthat/test-hello.R index b839815..c349858 100644 --- a/tests/testthat/test-hello.R +++ b/tests/testthat/test-hello.R @@ -3,5 +3,5 @@ library(clintrialx) test_that("hello function works correctly", { output <- hello() - expect_equal(output, "πŸ‘‹ Welcome to ClinTrialX!") + expect_equal(output, "Welcome to ClinTrialX!") }) diff --git a/vignettes/usecase-doc.R b/vignettes/usecase-doc.R new file mode 100644 index 0000000..9a3468a --- /dev/null +++ b/vignettes/usecase-doc.R @@ -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))) + diff --git a/vignettes/usecase-doc.Rmd b/vignettes/usecase-doc.Rmd index 40e303d..7eed87a 100644 --- a/vignettes/usecase-doc.Rmd +++ b/vignettes/usecase-doc.Rmd @@ -2,12 +2,11 @@ title: "Exploring Clinical Trial Data with clintrialx" author: "Indraneel Chakraborty" date: "`r Sys.Date()`" -output: - html_document: - theme: cerulean - highlight: tango - toc: true - toc_float: true +output: rmarkdown::html_vignette +vignette: > + %\VignetteIndexEntry{Exploring Clinical Trial Data with clintrialx} + %\VignetteEngine{knitr::rmarkdown} + %\VignetteEncoding{UTF-8} --- ## Introduction @@ -18,7 +17,7 @@ Welcome to the `clintrialx` vignette! This package simplifies the process of fet To start, load the necessary libraries. We use `suppressPackageStartupMessages` to keep the output clean: -```{r} +```{r, eval=FALSE} # Load required libraries invisible(suppressPackageStartupMessages({ library(clintrialx) # For fetching clinical trial data @@ -33,7 +32,7 @@ invisible(suppressPackageStartupMessages({ Retrieve clinical trial data related to cancer studies in India using the `ctg_bulk_fetch` function: -```{r} +```{r, eval=FALSE} # Fetch cancer study data in India df <- ctg_bulk_fetch(condition = "cancer", location = "India") ``` @@ -42,7 +41,7 @@ df <- ctg_bulk_fetch(condition = "cancer", location = "India") Understand the distribution of study statuses by creating a bar plot: -```{r} +```{r, eval=FALSE} # Create a table of study statuses status_counts <- table(df$`Study Status`) @@ -66,7 +65,7 @@ This plot provides an overview of the number of studies in each status category. Compare enrollment numbers across different study phases using an interactive box plot: -```{r} +```{r, 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) + @@ -85,7 +84,7 @@ This interactive plot allows you to explore enrollment numbers across different Examine the timeline of studies with a scatter plot: -```{r} +```{r, 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") @@ -107,7 +106,7 @@ This scatter plot helps visualize study durations and their statuses, providing Examine the relationship between funding sources and study types using a stacked bar plot: -```{r} +```{r, eval=FALSE} # Summarize and plot funding sources by study type df_summary <- df %>% count(`Funder Type`, `Study Type`) %>% From d3d7d8b880456b39c29f5427fac65a7a97362f19 Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Thu, 22 Aug 2024 10:45:08 +0530 Subject: [PATCH 04/13] [ADD] images for usecase doc --- vignettes/usecase-doc.Rmd | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/vignettes/usecase-doc.Rmd b/vignettes/usecase-doc.Rmd index 7eed87a..1d76b12 100644 --- a/vignettes/usecase-doc.Rmd +++ b/vignettes/usecase-doc.Rmd @@ -37,7 +37,7 @@ Retrieve clinical trial data related to cancer studies in India using the `ctg_b df <- ctg_bulk_fetch(condition = "cancer", location = "India") ``` -## Visualizing Study Status Distribution +## Visualizing Study Status Distribution Understand the distribution of study statuses by creating a bar plot: @@ -59,9 +59,11 @@ ggplotly(ggplot(status_df, aes(x = reorder(status, -count), y = count)) + geom_text(aes(label = count), vjust = -0.5)) ``` +![image](https://github.com/user-attachments/assets/633ed6a3-7fe9-4044-92c4-4ec4c26f4cf6) + This plot provides an overview of the number of studies in each status category. πŸ“‰ -## Analyzing Enrollment by Study Phase +## Analyzing Enrollment by Study Phase Compare enrollment numbers across different study phases using an interactive box plot: @@ -78,9 +80,11 @@ ggplotly(ggplot(df, aes(x = Phases, y = Enrollment)) + plot.title = element_text(hjust = 0.5))) ``` +![image](https://github.com/user-attachments/assets/3aef0bff-792b-4689-a80e-ef56b3074765) + This interactive plot allows you to explore enrollment numbers across different phases and identify trends. πŸ” -## Visualizing Study Duration Timeline +## Visualizing Study Duration Timeline Examine the timeline of studies with a scatter plot: @@ -100,6 +104,8 @@ ggplot(df, aes(x = start_date, y = completion_date, color = `Study Status`)) + scale_color_brewer(palette = "Set1") ``` +![image](https://github.com/user-attachments/assets/353f12d2-1a08-4e30-879b-bbac1d5d9651) + This scatter plot helps visualize study durations and their statuses, providing insights into timelines. ⏳ ## Analyzing Funding Sources and Study Types @@ -123,8 +129,10 @@ ggplotly(ggplot(df_summary, aes(x = `Funder Type`, y = prop, fill = `Study Type` theme(axis.text.x = element_text(angle = 45, hjust = 1))) ``` +![image](https://github.com/user-attachments/assets/ec71369c-491f-4b26-9b65-cbde1f4e99f0) + This plot uncovers patterns in how different funders support various study types. πŸ’‘ -## Conclusion +## Conclusion Using the `clintrialx` package along with visualization tools like `ggplot2` and `plotly`, you can extract valuable insights from clinical trial data. This vignette has illustrated techniques for analyzing cancer clinical trials in India, and these methods are adaptable to other datasets fetched with `clintrialx`. Happy analyzing! 😊 From b866f6e4940d002cf88541a01332970a13a92db6 Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Thu, 22 Aug 2024 21:15:11 +0530 Subject: [PATCH 05/13] [CRAN MOD] note adjustments --- DESCRIPTION | 4 +- R/ctg_data_report.R | 4 +- README.Rmd | 31 ++++-- README.md | 17 +-- man/ctg_data_report.Rd | 2 +- renv.lock | 235 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 271 insertions(+), 22 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 3cd3bec..5e09f37 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,7 +6,7 @@ Authors@R: person("Indraneel", "Chakraborty",, "hello.indraneel@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-6958-8269")) Maintainer: Indraneel Chakraborty -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! +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 Clinical Trials Transformation Initiative - Access to Aggregate Content of ClinicalTrials.gov 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 @@ -27,5 +27,3 @@ Suggests: VignetteBuilder: knitr RoxygenNote: 7.3.2 URL: http://www.indraneelchakraborty.com/clintrialx/ -ExtraLicense: LICENSE -ExtraFiles: CODE_OF_CONDUCT.md, logo.png diff --git a/R/ctg_data_report.R b/R/ctg_data_report.R index 64dba7d..b1531ea 100644 --- a/R/ctg_data_report.R +++ b/R/ctg_data_report.R @@ -113,7 +113,7 @@ #' } #' #' @seealso -#' \url{https://www.indraneelchakraborty.com/clintrialx} for more information about the ClinTrialX package. +#' \url{https://www.indraneelchakraborty.com/clintrialx/} for more information about the ClinTrialX package. #' @importFrom grDevices colorRampPalette #' @importFrom utils install.packages installed.packages #' @importFrom rmarkdown render @@ -200,7 +200,7 @@ ctg_data_report <- function(ctg_data, footer_content <- if (!is.null(custom_footer)) { paste0('\n\n\n') } else { - '\n\n\n' + '\n\n\n' } # Write the Rmd content dynamically diff --git a/README.Rmd b/README.Rmd index 16c96a5..3eaa19f 100644 --- a/README.Rmd +++ b/README.Rmd @@ -22,7 +22,7 @@ knitr::opts_chunk$set( [![R-CMD-check](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml) [![License: -Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://opensource.org/license/apache-2-0) [![pkgdown](https://img.shields.io/badge/pkgdown-docs-blue.svg)](https://www.indraneelchakraborty.com/clintrialx/) [![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Fineelhere%2Fclintrialx&label=Visitors&labelColor=%23f47373&countColor=%2337d67a&style=flat&labelStyle=upper)](https://github.com/ineelhere/clintrialx) @@ -113,7 +113,7 @@ ctg_get_fields( ``` -#### Based on fileds - Bulk download +#### Based on fields - Bulk download Download all available data for your query. No limits! @@ -144,9 +144,12 @@ print(results) ``` ## Trial Data HTML Reports + *Currently works for data from ClinicalTrials.Gov* -Visit here for an exqample report - https://www.indraneelchakraborty.com/clintrialx/report.html +Visit here for an exqample report - + + ```{r example6, eval = FALSE} #first get the data in a R dataframe my_clinical_trial_data <- ctg_bulk_fetch(condition="cancer") @@ -164,7 +167,9 @@ ctg_data_report( ) ``` -Check the path `reports/clinical_trials.html` on your local. It will have the html report file. + +Check the path `reports/clinical_trials.html` on your local. It will +have the html report file. Cool stuff - It also has the codes to the plots! @@ -180,13 +185,19 @@ version_info(source = "clinicaltrials.gov") ## Get Involved -πŸš€ **Ready to contribute?** Lets make`clintrialx` even better. -Check out the [contributing guidelines](https://github.com/ineelhere/clintrialx/blob/main/CONTRIBUTING.md) -to get started. +πŸš€ Ready to contribute? Let's make clintrialx even better! + +- Fork the [GitHub](https://github.com/ineelhere/clintrialx) repo. +- Check out your development branch from the dev branch. +- Do your work on a feature (ftr) branch. +- Raise a PR against the dev branch of the [clintrialx](https://github.com/ineelhere/clintrialx) repo. +- Sit back and [relax](https://www.youtube.com/watch?v=Uffjii1hXzU) while I review it! -πŸ’¬ **Questions or Feedback?** Feel free to open an issue on [GitHub Issues page](https://github.com/ineelhere/clintrialx/issues). +πŸ’¬ **Questions or Feedback?** Feel free to open an issue on [GitHub +Issues page](https://github.com/ineelhere/clintrialx/issues). -🌟 **Enjoying `clintrialx`?** Please consider giving it a star on [GitHub](https://github.com/ineelhere/clintrialx)! Your support helps this project -grow and improve. +🌟 **Enjoying `clintrialx`?** Please consider giving it a star on +[GitHub](https://github.com/ineelhere/clintrialx)! Your support helps +this project grow and improve. More updates to come. Happy coding! πŸŽ‰ diff --git a/README.md b/README.md index c05933d..1ea64a6 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![R-CMD-check](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml) [![License: -Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://opensource.org/license/apache-2-0) [![pkgdown](https://img.shields.io/badge/pkgdown-docs-blue.svg)](https://www.indraneelchakraborty.com/clintrialx/) [![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Fineelhere%2Fclintrialx&label=Visitors&labelColor=%23f47373&countColor=%2337d67a&style=flat&labelStyle=upper)](https://github.com/ineelhere/clintrialx) @@ -95,7 +95,7 @@ ctg_get_fields( ) ``` -#### Based on fileds - Bulk download +#### Based on fields - Bulk download Download all available data for your query. No limits! @@ -164,10 +164,15 @@ version_info(source = "clinicaltrials.gov") ## Get Involved -πŸš€ **Ready to contribute?** Lets make`clintrialx` even better. Check out -the [contributing -guidelines](https://github.com/ineelhere/clintrialx/blob/main/CONTRIBUTING.md) -to get started. +πŸš€ Ready to contribute? Let’s make clintrialx even better! + +- Fork the [GitHub](https://github.com/ineelhere/clintrialx) repo. +- Check out your development branch from the dev branch. +- Do your work on a feature (ftr) branch. +- Raise a PR against the dev branch of the + [clintrialx](https://github.com/ineelhere/clintrialx) repo. +- Sit back and [relax](https://www.youtube.com/watch?v=Uffjii1hXzU) + while I review it! πŸ’¬ **Questions or Feedback?** Feel free to open an issue on [GitHub Issues page](https://github.com/ineelhere/clintrialx/issues). diff --git a/man/ctg_data_report.Rd b/man/ctg_data_report.Rd index 3087ea4..36fb373 100644 --- a/man/ctg_data_report.Rd +++ b/man/ctg_data_report.Rd @@ -143,5 +143,5 @@ ctg_data_report( } \seealso{ -\url{https://www.indraneelchakraborty.com/clintrialx} for more information about the ClinTrialX package. +\url{https://www.indraneelchakraborty.com/clintrialx/} for more information about the ClinTrialX package. } diff --git a/renv.lock b/renv.lock index 7de2e2c..bc2252e 100644 --- a/renv.lock +++ b/renv.lock @@ -52,6 +52,16 @@ ], "Hash": "cad6cf7f1d5f6e906700b9d3e718c796" }, + "base64enc": { + "Package": "base64enc", + "Version": "0.1-3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "543776ae6848fde2f48ff3816d0628bc" + }, "bit": { "Package": "bit", "Version": "4.0.5", @@ -76,6 +86,39 @@ ], "Hash": "9fe98599ca456d6552421db0d6772d8f" }, + "bslib": { + "Package": "bslib", + "Version": "0.7.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "cachem", + "fastmap", + "grDevices", + "htmltools", + "jquerylib", + "jsonlite", + "lifecycle", + "memoise", + "mime", + "rlang", + "sass" + ], + "Hash": "8644cc53f43828f19133548195d7e59e" + }, + "cachem": { + "Package": "cachem", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "fastmap", + "rlang" + ], + "Hash": "cd9a672193789068eb5a2aad65a0dedf" + }, "cli": { "Package": "cli", "Version": "3.6.3", @@ -129,6 +172,17 @@ ], "Hash": "411ca2c03b1ce5f548345d2fc2685f7a" }, + "digest": { + "Package": "digest", + "Version": "0.6.36", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "utils" + ], + "Hash": "fd6824ad91ede64151e93af67df6376b" + }, "dplyr": { "Package": "dplyr", "Version": "1.1.4", @@ -152,6 +206,17 @@ ], "Hash": "fedd9d00c2944ff00a0e2696ccf048ec" }, + "evaluate": { + "Package": "evaluate", + "Version": "0.24.0", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "a1066cbc05caee9a4bf6d90f194ff4da" + }, "fansi": { "Package": "fansi", "Version": "1.0.6", @@ -164,6 +229,36 @@ ], "Hash": "962174cf2aeb5b9eea581522286a911f" }, + "fastmap": { + "Package": "fastmap", + "Version": "1.2.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "aa5e1cd11c2d15497494c5292d7ffcc8" + }, + "fontawesome": { + "Package": "fontawesome", + "Version": "0.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "htmltools", + "rlang" + ], + "Hash": "c2efdd5f0bcd1ea861c2d4e2a883a67d" + }, + "fs": { + "Package": "fs", + "Version": "1.6.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "methods" + ], + "Hash": "15aeb8c27f5ea5161f9f6a641fafd93a" + }, "generics": { "Package": "generics", "Version": "0.1.3", @@ -186,6 +281,17 @@ ], "Hash": "e0b3a53876554bd45879e596cdb10a52" }, + "highr": { + "Package": "highr", + "Version": "0.11", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "xfun" + ], + "Hash": "d65ba49117ca223614f71b60d85b8ab7" + }, "hms": { "Package": "hms", "Version": "1.1.3", @@ -200,6 +306,22 @@ ], "Hash": "b59377caa7ed00fa41808342002138f9" }, + "htmltools": { + "Package": "htmltools", + "Version": "0.5.8.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "base64enc", + "digest", + "fastmap", + "grDevices", + "rlang", + "utils" + ], + "Hash": "81d371a9cc60640e74e4ab6ac46dcedc" + }, "httr": { "Package": "httr", "Version": "1.4.7", @@ -215,6 +337,16 @@ ], "Hash": "ac107251d9d9fd72f0ca8049988f1d7f" }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "htmltools" + ], + "Hash": "5aab57a3bd297eee1c1d862735972182" + }, "jsonlite": { "Package": "jsonlite", "Version": "1.8.8", @@ -225,6 +357,22 @@ ], "Hash": "e1b9c55281c5adc4dd113652d9e26768" }, + "knitr": { + "Package": "knitr", + "Version": "1.48", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "evaluate", + "highr", + "methods", + "tools", + "xfun", + "yaml" + ], + "Hash": "acf380f300c721da9fde7df115a5f86f" + }, "lifecycle": { "Package": "lifecycle", "Version": "1.0.4", @@ -261,6 +409,17 @@ ], "Hash": "7ce2733a9826b3aeb1775d56fd305472" }, + "memoise": { + "Package": "memoise", + "Version": "2.0.1", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "cachem", + "rlang" + ], + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" + }, "mime": { "Package": "mime", "Version": "0.12", @@ -332,6 +491,16 @@ ], "Hash": "f4625e061cb2865f111b47ff163a5ca6" }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R" + ], + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" + }, "readr": { "Package": "readr", "Version": "2.1.5", @@ -376,6 +545,43 @@ ], "Hash": "3eec01f8b1dee337674b2e34ab1f9bc1" }, + "rmarkdown": { + "Package": "rmarkdown", + "Version": "2.27", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R", + "bslib", + "evaluate", + "fontawesome", + "htmltools", + "jquerylib", + "jsonlite", + "knitr", + "methods", + "tinytex", + "tools", + "utils", + "xfun", + "yaml" + ], + "Hash": "27f9502e1cdbfa195f94e03b0f517484" + }, + "sass": { + "Package": "sass", + "Version": "0.4.9", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "R6", + "fs", + "htmltools", + "rappdirs", + "rlang" + ], + "Hash": "d53dbfddf695303ea4ad66f86e99b95d" + }, "sys": { "Package": "sys", "Version": "3.4.2", @@ -429,6 +635,16 @@ ], "Hash": "c5f3c201b931cd6474d17d8700ccb1c8" }, + "tinytex": { + "Package": "tinytex", + "Version": "0.52", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "xfun" + ], + "Hash": "cfbad971a71f0e27cec22e544a08bc3b" + }, "tzdb": { "Package": "tzdb", "Version": "0.4.0", @@ -501,6 +717,25 @@ "graphics" ], "Hash": "d31b6c62c10dcf11ec530ca6b0dd5d35" + }, + "xfun": { + "Package": "xfun", + "Version": "0.46", + "Source": "Repository", + "Repository": "CRAN", + "Requirements": [ + "grDevices", + "stats", + "tools" + ], + "Hash": "00ce32f398db0415dde61abfef11300c" + }, + "yaml": { + "Package": "yaml", + "Version": "2.3.9", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "9cb28d11799d93c953f852083d55ee9e" } } } From 2fd684707a39414e4455f06a439629bde47214bd Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Fri, 23 Aug 2024 10:21:22 +0530 Subject: [PATCH 06/13] [SEM] gram mods --- DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5e09f37..34a5820 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ 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 using R Programming Version: 0.1.0 Authors@R: person("Indraneel", "Chakraborty",, "hello.indraneel@gmail.com", From 6074b78d7c3747de142a2f0458b69fbc5fdff6bf Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:37:56 +0530 Subject: [PATCH 07/13] [CRAN MOD] limit heavy comp on egs --- R/ctg_bulk_fetch.R | 3 +++ man/ctg_bulk_fetch.Rd | 2 ++ pkgdown/favicon/apple-touch-icon-120x120.png | Bin 15000 -> 15000 bytes pkgdown/favicon/apple-touch-icon-152x152.png | Bin 21139 -> 21139 bytes pkgdown/favicon/apple-touch-icon-180x180.png | Bin 26962 -> 26962 bytes pkgdown/favicon/apple-touch-icon-60x60.png | Bin 5790 -> 5790 bytes pkgdown/favicon/apple-touch-icon-76x76.png | Bin 8015 -> 8015 bytes pkgdown/favicon/apple-touch-icon.png | Bin 26962 -> 26962 bytes pkgdown/favicon/favicon-16x16.png | Bin 1410 -> 1410 bytes pkgdown/favicon/favicon-32x32.png | Bin 2613 -> 2613 bytes 10 files changed, 5 insertions(+) diff --git a/R/ctg_bulk_fetch.R b/R/ctg_bulk_fetch.R index 301d4b9..725bdb8 100644 --- a/R/ctg_bulk_fetch.R +++ b/R/ctg_bulk_fetch.R @@ -37,9 +37,12 @@ #' #' #' @examples +#' \dontrun{ #' trials <- ctg_bulk_fetch(location="india") +#' } #' @export + ctg_bulk_fetch <- function(condition = NULL, location = NULL, title = NULL, intervention = NULL, status = NULL) { diff --git a/man/ctg_bulk_fetch.Rd b/man/ctg_bulk_fetch.Rd index c1c9533..105535a 100644 --- a/man/ctg_bulk_fetch.Rd +++ b/man/ctg_bulk_fetch.Rd @@ -50,5 +50,7 @@ This function retrieves clinical trial data in bulk from the ClinicalTrials.gov specified parameters. It handles pagination and returns a combined dataset. } \examples{ +\dontrun{ trials <- ctg_bulk_fetch(location="india") } +} diff --git a/pkgdown/favicon/apple-touch-icon-120x120.png b/pkgdown/favicon/apple-touch-icon-120x120.png index edd5c40947a7e5ae236108d611df2717a5d3dc52..0821bce574b5b9e6a99ccba76de6d2dd5b9100b0 100644 GIT binary patch delta 97 zcmbPHI-_(#B`1eCD+{+B$I0^>o8m1!EOd>GLkvu<3{0#H4YdsntPBip6<%RvU|>)! kag8WRNi0dV%FR#7OsixtGB7gHHNc`_wNB37$(mOA0CC0}$p8QV delta 97 zcmbPHI-_(#B`3S6fT)%*&k=`>P4Si<=DJ3PA%sekrd2W+85o)98eq}TG27(IWKFAl0BNKg2mk;8 diff --git a/pkgdown/favicon/apple-touch-icon-152x152.png b/pkgdown/favicon/apple-touch-icon-152x152.png index bd09f892748f11b50801da57d645f5be9ab59c5e..3c8afcefc681a2e5459c08f84722c9b8ad771e84 100644 GIT binary patch delta 99 zcmbQdlyUM>#tD_29OA4jJPUGSayB+a1$tQM8X1Qem|7W_SQ#2=8yHv_7`&c&ZVm$j ngKCLuL`h0wNvc(DeoAIqC4-THk%_JW77eqGlqpPB3Cafm$D#tD_2?4kmq+9}*$u5E0J3iL47H8Kn_G_x`?v@$W)HZZUd7P>~pAqJ*a1}0X92HFM&Rt5$&Z1=ZL{wFGh OO^!D@opZ9jSUvzFeH0e} delta 76 zcmbQIJ5P5)B`3S6fT(5{>(pNxn^Hx^&2^0oLk!KVj0~+z47CjmtPBiJ=uP`N`Jbp1 OHo2X}dY+T@#qt4SzZLxe diff --git a/pkgdown/favicon/apple-touch-icon-76x76.png b/pkgdown/favicon/apple-touch-icon-76x76.png index 7e5db1756f59f53d1bc19b2b025143d504783133..e9ba0b4c40fac78b428130d58829bda122d8e646 100644 GIT binary patch delta 76 zcmX?aciwJ7B`1eCD+`w=|If&cO=5E57P>~pAqJ*a1}0X92HFM&Rt5$&Z1=ZLUN0ww OO^!D@opbU7xqJXK!W75= delta 76 zcmX?aciwJ7B`3S6fT)%*&k=`>O=5E5=DJ3PA%!GdwJGjf_JKOsxz|tPD-G4GgRd3_3i2FJoX} mP%UwdC`m~yNwvz&PsvQHWH2%?GSM}_qT#2Av()6r8TkOZpd8)+ delta 99 zcmca~iSg1U#tD_2?4kmqI=}K0OE)%2W_XzE8X1NdnpqhcTA7$=8yHv_7|ase8N|TA npjzS@QIe8al4_NkpOTqY$zWt)WTI<;MZ;@v#&?q+XXFC_1R5SK diff --git a/pkgdown/favicon/favicon-16x16.png b/pkgdown/favicon/favicon-16x16.png index 5f8fc1c69de3f5af213c61becd644cc5da7697f0..0fe85070db83df62330abead51db89c0d045d2d2 100644 GIT binary patch delta 99 zcmZqTZsOiBmzk48oRvi=DmjsV^D<^tMh^>JBjXSQQ!4`#D?cndll|(O|blGjFmmYd!$~pBdx; delta 99 zcmZqTZsOiBmzk4YR6tZuB#|L<^D<^tMh|mcBf}6wGbGLkvu<3{0#HEwv2{tPBiZ&YP9Sz`&qd l;u=wsl30>zm7AZEnO4bQWME{XYk)<=jKfN|CLiO>2LNDZ9E<<} delta 97 zcmdlgvQ=b4B`3S6fT*5GB17cHrav4W=DJ3PA%44X|jaxgv0U@-fbQ014Y05dZ)H From 843c3c89793ad0ed2a950d83b207b7e44e03b50c Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:02:50 +0530 Subject: [PATCH 08/13] [CRAN MOD] unwrap the examples if they are executable in < 5 sec, or replace dontrun{} with \donttest{} --- DESCRIPTION | 6 +++--- R/aact_query.R | 6 +++--- R/ctg_bulk_fetch.R | 2 +- R/ctg_data_report.R | 2 +- man/aact_check_connection.Rd | 2 +- man/aact_connection.Rd | 2 +- man/aact_custom_query.Rd | 2 +- man/ctg_bulk_fetch.Rd | 3 ++- man/ctg_data_report.Rd | 2 +- 9 files changed, 14 insertions(+), 13 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 34a5820..189d9b1 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,13 +1,13 @@ Package: clintrialx Type: Package -Title: Connect and Work with Clinical Trials Data Sources using R Programming +Title: Connect and Work with Clinical Trials Data Sources Version: 0.1.0 Authors@R: person("Indraneel", "Chakraborty",, "hello.indraneel@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-6958-8269")) Maintainer: Indraneel Chakraborty -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 Clinical Trials Transformation Initiative - Access to Aggregate Content of ClinicalTrials.gov 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 +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 'Clinical Trials Transformation Initiative - Access to Aggregate Content of ClinicalTrials.gov' database , supporting pagination and bulk downloads. Also, you can generate HTML reports based on the data obtained from the sources! +License: Apache License 2.0 Encoding: UTF-8 LazyData: true Depends: diff --git a/R/aact_query.R b/R/aact_query.R index e07d2ea..86b84eb 100644 --- a/R/aact_query.R +++ b/R/aact_query.R @@ -6,7 +6,7 @@ #' @import DBI #' @import RPostgreSQL #' @examples -#' \dontrun{ +#' \donttest{ #' # Set environment variables for database credentials in .Renviron and load it #' # readRenviron(".Renviron") #' @@ -32,7 +32,7 @@ aact_connection <- function(user, password) { #' @return A data frame with distinct study types #' @import DBI #' @examples -#' \dontrun{ +#' \donttest{ #' # Set environment variables for database credentials in .Renviron and load it #' # readRenviron(".Renviron") #' @@ -58,7 +58,7 @@ aact_check_connection <- function(con) { #' @return A data frame with the query results #' @import DBI #' @examples -#' \dontrun{ +#' \donttest{ #' # Set environment variables for database credentials in .Renviron and load it #' # readRenviron(".Renviron") #' diff --git a/R/ctg_bulk_fetch.R b/R/ctg_bulk_fetch.R index 725bdb8..6095a86 100644 --- a/R/ctg_bulk_fetch.R +++ b/R/ctg_bulk_fetch.R @@ -37,7 +37,7 @@ #' #' #' @examples -#' \dontrun{ +#' \donttest{ #' trials <- ctg_bulk_fetch(location="india") #' } #' @export diff --git a/R/ctg_data_report.R b/R/ctg_data_report.R index b1531ea..5e04240 100644 --- a/R/ctg_data_report.R +++ b/R/ctg_data_report.R @@ -86,7 +86,7 @@ #' } #' #' @examples -#' \dontrun{ +#' \donttest{ #' # Basic usage with default settings #' ctg_data_report(my_clinical_trial_data) #' diff --git a/man/aact_check_connection.Rd b/man/aact_check_connection.Rd index 2d9474c..4f05ad5 100644 --- a/man/aact_check_connection.Rd +++ b/man/aact_check_connection.Rd @@ -16,7 +16,7 @@ A data frame with distinct study types Check database connection } \examples{ -\dontrun{ +\donttest{ # Set environment variables for database credentials in .Renviron and load it # readRenviron(".Renviron") diff --git a/man/aact_connection.Rd b/man/aact_connection.Rd index dc3eded..c5426e1 100644 --- a/man/aact_connection.Rd +++ b/man/aact_connection.Rd @@ -18,7 +18,7 @@ A connection object to the AACT database Connect to AACT PostgreSQL database } \examples{ -\dontrun{ +\donttest{ # Set environment variables for database credentials in .Renviron and load it # readRenviron(".Renviron") diff --git a/man/aact_custom_query.Rd b/man/aact_custom_query.Rd index cfde632..05be731 100644 --- a/man/aact_custom_query.Rd +++ b/man/aact_custom_query.Rd @@ -18,7 +18,7 @@ A data frame with the query results Run a custom query } \examples{ -\dontrun{ +\donttest{ # Set environment variables for database credentials in .Renviron and load it # readRenviron(".Renviron") diff --git a/man/ctg_bulk_fetch.Rd b/man/ctg_bulk_fetch.Rd index 105535a..b567cfd 100644 --- a/man/ctg_bulk_fetch.Rd +++ b/man/ctg_bulk_fetch.Rd @@ -50,7 +50,8 @@ This function retrieves clinical trial data in bulk from the ClinicalTrials.gov specified parameters. It handles pagination and returns a combined dataset. } \examples{ -\dontrun{ +\donttest{ trials <- ctg_bulk_fetch(location="india") +print(trials) } } diff --git a/man/ctg_data_report.Rd b/man/ctg_data_report.Rd index 36fb373..0ae15e5 100644 --- a/man/ctg_data_report.Rd +++ b/man/ctg_data_report.Rd @@ -115,7 +115,7 @@ The function performs these key steps: } \examples{ -\dontrun{ +\donttest{ # Basic usage with default settings ctg_data_report(my_clinical_trial_data) From a5baccaf1b26851a2e9cb40ec74e2b5940054d32 Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Wed, 28 Aug 2024 21:34:01 +0530 Subject: [PATCH 09/13] [CRAN MOD] optimize example runs and file specs --- .Rbuildignore | 3 ++ R/ctg_data_report.R | 70 ++++++------------------------------------ R/hello.R | 8 ++--- README.Rmd | 8 +++++ README.md | 8 +++++ man/ctg_bulk_fetch.Rd | 1 - man/ctg_data_report.Rd | 28 ----------------- man/hello.Rd | 2 +- 8 files changed, 34 insertions(+), 94 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index aac34fe..ffc266c 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -9,3 +9,6 @@ ^README\.Rmd$ ^CODE_OF_CONDUCT\.md$ ^logo\.png$ +^report.html$ +^LICENSE$ +^reports$ diff --git a/R/ctg_data_report.R b/R/ctg_data_report.R index 5e04240..f2405db 100644 --- a/R/ctg_data_report.R +++ b/R/ctg_data_report.R @@ -85,39 +85,13 @@ #' \item The generated report is self-contained and can be easily shared or published on the web. #' } #' -#' @examples -#' \donttest{ -#' # Basic usage with default settings -#' ctg_data_report(my_clinical_trial_data) -#' -#' # Customized report with specific settings -#' ctg_data_report( -#' ctg_data = my_clinical_trial_data, -#' title = "Clinical Trials Analysis", -#' author = "Indra", -#' output_file = "reports/clinical_trials.html", -#' theme = "flatly", -#' color_palette = c("#4E79A7", "#F28E2B", "#E15759", "#76B7B2", "#59A14F", "#EDC948"), -#' include_data_quality = TRUE, -#' include_interactive_plots = TRUE, -#' custom_footer = "Proprietary report generated by SomeGreatOrg Inc." -#' ) -#' -#' # Generate a report with static plots and no data quality assessment -#' ctg_data_report( -#' my_clinical_trial_data, -#' title = "Quick Clinical Trial Overview", -#' include_data_quality = FALSE, -#' include_interactive_plots = FALSE -#' ) -#' } -#' #' @seealso #' \url{https://www.indraneelchakraborty.com/clintrialx/} for more information about the ClinTrialX package. #' @importFrom grDevices colorRampPalette #' @importFrom utils install.packages installed.packages #' @importFrom rmarkdown render #' @export + ctg_data_report <- function(ctg_data, title = "Clinical Trial Data Report", author = "Author Name", @@ -127,49 +101,25 @@ ctg_data_report <- function(ctg_data, include_data_quality = TRUE, include_interactive_plots = TRUE, custom_footer = NULL) { + # List of required packages required_packages <- c("rmarkdown", "ggplot2", "plotly", "dplyr", "lubridate", "reactable", "scales", "RColorBrewer", "htmltools") - # Function to check if a package is installed - is_installed <- function(package) { - return(package %in% rownames(installed.packages())) - } - - # Check which packages are missing - missing_packages <- required_packages[!sapply(required_packages, is_installed)] + # Check if required packages are available + missing_packages <- required_packages[!sapply(required_packages, requireNamespace, quietly = TRUE)] - # If there are missing packages, print a message and offer to install them if (length(missing_packages) > 0) { - cat("The following packages are required but not installed:\n") - cat(paste("-", missing_packages, collapse = "\n"), "\n\n") - - install_choice <- readline(prompt = "Would you like to install these packages now? (yes/no): ") - - if (tolower(install_choice) == "yes") { - install.packages(missing_packages) - cat("\nPackages installed successfully.\n") - } else { - cat("\nPlease install the missing packages before running the report generation function.\n") - return() - } - } else { - cat("All required packages are already installed.\n") + stop("The following required packages are not installed: ", + paste(missing_packages, collapse = ", "), + ". Please install these packages before running this function.") } - # Load all required packages - lapply(required_packages, library, character.only = TRUE) - - cat("\nAll necessary packages are now loaded and ready to use.\n") - # Available themes available_themes <- c("default", "cerulean", "journal", "flatly", "readable", "spacelab", "united", "cosmo", "lumen", "paper", "sandstone", "simplex", "yeti") # Check if the provided theme is valid if (!(theme %in% available_themes)) { - cat("Invalid theme selected. Available themes are:\n") - cat(paste("-", available_themes, collapse = "\n"), "\n\n") - theme_choice <- readline(prompt = "Please choose a valid theme: ") - theme <- match.arg(theme_choice, available_themes) + stop("Invalid theme selected. Available themes are: ", paste(available_themes, collapse = ", ")) } # Create a temporary Rmd file @@ -447,10 +397,10 @@ For any questions or further analysis requests, please contact the report author writeLines(rmd_content, temp_rmd) # Render the Rmd file to HTML -render(temp_rmd, output_file = output_file, output_dir = dirname(output_file)) +rmarkdown::render(temp_rmd, output_file = output_file, output_dir = dirname(output_file)) # Clean up the temporary file unlink(temp_rmd) -cat("Report successfully generated at:", normalizePath(output_file), "\n") +message("Report successfully generated at:", normalizePath(output_file), "\n") } diff --git a/R/hello.R b/R/hello.R index b0a8eb8..8e9d8c5 100644 --- a/R/hello.R +++ b/R/hello.R @@ -1,13 +1,13 @@ #' Print a Welcome Message #' -#' This function prints a welcome message for ClinTrialX. +#' This function returns a welcome message for ClinTrialX. #' #' @return A character string containing the welcome message. #' @export #' @examples #' hello() hello <- function() { - message <- "Welcome to ClinTrialX!" - Encoding(message) <- "UTF-8" - print(message) + msg <- "Welcome to ClinTrialX!" + Encoding(msg) <- "UTF-8" + return(msg) # Return the message for further use } diff --git a/README.Rmd b/README.Rmd index 3eaa19f..e1b2a4b 100644 --- a/README.Rmd +++ b/README.Rmd @@ -166,6 +166,14 @@ ctg_data_report( custom_footer = "Proprietary report generated by SomeGreatOrg Inc." ) +# Generate a report with static plots and no data quality assessment +ctg_data_report( + ctg_data = my_clinical_trial_data, + title = "Quick Clinical Trial Overview", + include_data_quality = FALSE, + include_interactive_plots = FALSE +) + ``` Check the path `reports/clinical_trials.html` on your local. It will diff --git a/README.md b/README.md index 1ea64a6..14361dc 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,14 @@ ctg_data_report( include_interactive_plots = TRUE, custom_footer = "Proprietary report generated by SomeGreatOrg Inc." ) + +# Generate a report with static plots and no data quality assessment +ctg_data_report( + ctg_data = my_clinical_trial_data, + title = "Quick Clinical Trial Overview", + include_data_quality = FALSE, + include_interactive_plots = FALSE +) ``` Check the path `reports/clinical_trials.html` on your local. It will diff --git a/man/ctg_bulk_fetch.Rd b/man/ctg_bulk_fetch.Rd index b567cfd..7ae7658 100644 --- a/man/ctg_bulk_fetch.Rd +++ b/man/ctg_bulk_fetch.Rd @@ -52,6 +52,5 @@ specified parameters. It handles pagination and returns a combined dataset. \examples{ \donttest{ trials <- ctg_bulk_fetch(location="india") -print(trials) } } diff --git a/man/ctg_data_report.Rd b/man/ctg_data_report.Rd index 0ae15e5..c62d15e 100644 --- a/man/ctg_data_report.Rd +++ b/man/ctg_data_report.Rd @@ -114,34 +114,6 @@ The function performs these key steps: } } -\examples{ -\donttest{ -# Basic usage with default settings -ctg_data_report(my_clinical_trial_data) - -# Customized report with specific settings -ctg_data_report( - ctg_data = my_clinical_trial_data, - title = "Clinical Trials Analysis", - author = "Indra", - output_file = "reports/clinical_trials.html", - theme = "flatly", - color_palette = c("#4E79A7", "#F28E2B", "#E15759", "#76B7B2", "#59A14F", "#EDC948"), - include_data_quality = TRUE, - include_interactive_plots = TRUE, - custom_footer = "Proprietary report generated by SomeGreatOrg Inc." -) - -# Generate a report with static plots and no data quality assessment -ctg_data_report( - my_clinical_trial_data, - title = "Quick Clinical Trial Overview", - include_data_quality = FALSE, - include_interactive_plots = FALSE -) -} - -} \seealso{ \url{https://www.indraneelchakraborty.com/clintrialx/} for more information about the ClinTrialX package. } diff --git a/man/hello.Rd b/man/hello.Rd index e1bc7e5..2c460a5 100644 --- a/man/hello.Rd +++ b/man/hello.Rd @@ -10,7 +10,7 @@ hello() A character string containing the welcome message. } \description{ -This function prints a welcome message for ClinTrialX. +This function returns a welcome message for ClinTrialX. } \examples{ hello() From 080d862475fde700a19fee1dd16e3726fb08a7f0 Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Thu, 29 Aug 2024 08:34:38 +0530 Subject: [PATCH 10/13] [CRAN MOD] resolve xfun version clashes in win check --- .Rbuildignore | 2 ++ DESCRIPTION | 3 ++- renv.lock | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index ffc266c..155d859 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -12,3 +12,5 @@ ^report.html$ ^LICENSE$ ^reports$ +^CRAN-SUBMISSION$ +^cran-comments\.md$ diff --git a/DESCRIPTION b/DESCRIPTION index 189d9b1..6de145e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -21,7 +21,8 @@ Imports: RPostgreSQL, tibble, DBI, - rmarkdown + rmarkdown, + xfun (>= 0.44) Suggests: knitr VignetteBuilder: knitr diff --git a/renv.lock b/renv.lock index bc2252e..8b4cd81 100644 --- a/renv.lock +++ b/renv.lock @@ -720,15 +720,16 @@ }, "xfun": { "Package": "xfun", - "Version": "0.46", + "Version": "0.47", "Source": "Repository", "Repository": "CRAN", "Requirements": [ + "R", "grDevices", "stats", "tools" ], - "Hash": "00ce32f398db0415dde61abfef11300c" + "Hash": "36ab21660e2d095fef0d83f689e0477c" }, "yaml": { "Package": "yaml", From 43603c2867090d28dd70bc05a91924c32bd42832 Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Thu, 29 Aug 2024 08:37:16 +0530 Subject: [PATCH 11/13] [ADD] CRAN submission info --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 31868fa..bcd0a9e 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,5 @@ po/*~ rsconnect/ docs *.html +CRAN-SUBMISSION +cran-comments.md \ No newline at end of file From a3df1316a64bbba68ee23ae18e967e4546ad99e3 Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Tue, 3 Sep 2024 22:15:28 +0530 Subject: [PATCH 12/13] [ADD][CRAN-STATS] published to CRAN! --- README.Rmd | 11 ++++++++++- README.md | 13 +++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/README.Rmd b/README.Rmd index e1b2a4b..ec67ef3 100644 --- a/README.Rmd +++ b/README.Rmd @@ -19,7 +19,10 @@ knitr::opts_chunk$set( # `ClinTrialX` - +[![CRAN +status](https://www.r-pkg.org/badges/version/clintrialx)](https://CRAN.R-project.org/package=clintrialx) +[![CRAN +downloads](https://cranlogs.r-pkg.org/badges/clintrialx)](https://CRAN.R-project.org/package=clintrialx) [![R-CMD-check](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml) [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://opensource.org/license/apache-2-0) @@ -44,9 +47,15 @@ available registries. Currently, it supports querying the ## Installation +Install the package from [CRAN](https://CRAN.R-project.org/package=clintrialx) with: +```r +install.packages("clintrialx") +``` You can install this package from [GitHub](https://github.com/ineelhere/clintrialx) with: +*you'll need the `devtools` package for this* + ``` r # install.packages("devtools") devtools::install_github("ineelhere/clintrialx") diff --git a/README.md b/README.md index 14361dc..a9769d1 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ +[![CRAN +status](https://www.r-pkg.org/badges/version/clintrialx)](https://CRAN.R-project.org/package=clintrialx) +[![CRAN +downloads](https://cranlogs.r-pkg.org/badges/clintrialx)](https://CRAN.R-project.org/package=clintrialx) [![R-CMD-check](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml) [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://opensource.org/license/apache-2-0) @@ -29,9 +33,18 @@ available registries. Currently, it supports querying the ## Installation +Install the package from +[CRAN](https://CRAN.R-project.org/package=clintrialx) with: + +``` r +install.packages("clintrialx") +``` + You can install this package from [GitHub](https://github.com/ineelhere/clintrialx) with: +*you’ll need the `devtools` package for this* + ``` r # install.packages("devtools") devtools::install_github("ineelhere/clintrialx") From 2bad74128ffb685461977dd3010e2a12811968f8 Mon Sep 17 00:00:00 2001 From: Indraneel Chakraborty <64887729+ineelhere@users.noreply.github.com> Date: Tue, 3 Sep 2024 22:16:59 +0530 Subject: [PATCH 13/13] [ADD][CRAN-STATS] published to CRAN! --- README.Rmd | 8 ++++---- README.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.Rmd b/README.Rmd index ec67ef3..6153c1d 100644 --- a/README.Rmd +++ b/README.Rmd @@ -19,15 +19,15 @@ knitr::opts_chunk$set( # `ClinTrialX` -[![CRAN -status](https://www.r-pkg.org/badges/version/clintrialx)](https://CRAN.R-project.org/package=clintrialx) -[![CRAN -downloads](https://cranlogs.r-pkg.org/badges/clintrialx)](https://CRAN.R-project.org/package=clintrialx) [![R-CMD-check](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml) [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://opensource.org/license/apache-2-0) [![pkgdown](https://img.shields.io/badge/pkgdown-docs-blue.svg)](https://www.indraneelchakraborty.com/clintrialx/) [![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Fineelhere%2Fclintrialx&label=Visitors&labelColor=%23f47373&countColor=%2337d67a&style=flat&labelStyle=upper)](https://github.com/ineelhere/clintrialx) +[![CRAN +status](https://www.r-pkg.org/badges/version/clintrialx)](https://CRAN.R-project.org/package=clintrialx) +[![CRAN +downloads](https://cranlogs.r-pkg.org/badges/clintrialx)](https://CRAN.R-project.org/package=clintrialx) [![Data Sources: ClinicalTrials.gov](https://img.shields.io/badge/Data_Sources-ClinicalTrials.gov-blue)](https://clinicaltrials.gov/data-api/api) diff --git a/README.md b/README.md index a9769d1..5706334 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,15 @@ -[![CRAN -status](https://www.r-pkg.org/badges/version/clintrialx)](https://CRAN.R-project.org/package=clintrialx) -[![CRAN -downloads](https://cranlogs.r-pkg.org/badges/clintrialx)](https://CRAN.R-project.org/package=clintrialx) [![R-CMD-check](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ineelhere/clintrialx/actions/workflows/R-CMD-check.yaml) [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://opensource.org/license/apache-2-0) [![pkgdown](https://img.shields.io/badge/pkgdown-docs-blue.svg)](https://www.indraneelchakraborty.com/clintrialx/) [![Visitors](https://api.visitorbadge.io/api/visitors?path=https%3A%2F%2Fgithub.com%2Fineelhere%2Fclintrialx&label=Visitors&labelColor=%23f47373&countColor=%2337d67a&style=flat&labelStyle=upper)](https://github.com/ineelhere/clintrialx) +[![CRAN +status](https://www.r-pkg.org/badges/version/clintrialx)](https://CRAN.R-project.org/package=clintrialx) +[![CRAN +downloads](https://cranlogs.r-pkg.org/badges/clintrialx)](https://CRAN.R-project.org/package=clintrialx) [![Data Sources: ClinicalTrials.gov](https://img.shields.io/badge/Data_Sources-ClinicalTrials.gov-blue)](https://clinicaltrials.gov/data-api/api)