Skip to content

Commit

Permalink
Merge branch 'main' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
manciniedoardo authored Sep 18, 2023
2 parents 1806b42 + 8b17a23 commit 66a1210
Show file tree
Hide file tree
Showing 93 changed files with 316,450 additions and 21 deletions.
51 changes: 42 additions & 9 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -1,15 +1,48 @@
# Set renv profile base on R version.
if ((Sys.getenv("GITHUB_ACTIONS") == "") && (Sys.getenv("DOCKER_CONTAINER_CONTEXT") == "")) {
renv_profile <- paste(R.version$major, substr(R.version$minor, 1, 1), sep = ".")
if (file.exists("./renv/profile")) {
message("Using renv profile from `renv/profile` file.")
} else if (renv_profile %in% c("4.1", "4.2", "4.3")) {
message("Set renv profile to `", renv_profile, "`")
Sys.setenv("RENV_PROFILE" = renv_profile)
.get_dependencies <- function(project_dir) {

admdev_loc <- find.package("admiraldev", lib.loc = .libPaths(), quiet = TRUE)
adm_dev_suggests <- if(length(admdev_loc) != 0) {
renv:::renv_dependencies_discover_description(admdev_loc, fields = c("Depends", "Imports", "LinkingTo", "Suggests"))
} else {
data.frame(Packages = character(0))
}
suggests_packages <- renv:::renv_dependencies_discover_description(project_dir, fields = "Suggests")

packages <- names(
renv:::renv_package_dependencies(
unique(c(
project_dir,
adm_dev_suggests[["Package"]],
suggests_packages[["Package"]],
c("staged.dependencies", "renv", "styler")
))
)
)
packages[!(packages %in% c("admiral", "admiraldev", "admiralci", "pharmaversesdtm", getwd()))]
}

options(renv.snapshot.filter = .get_dependencies)

.renv_profile <- paste(R.version$major, substr(R.version$minor, 1, 1), sep = ".")
if (!file.exists("./renv/profile")) {
if (.renv_profile %in% c("4.1", "4.2", "4.3")) {
message("Set renv profile to `", .renv_profile, "`")
Sys.setenv("RENV_PROFILE" = .renv_profile)
} else {
message("This repository do not contains the renv profile for your R version.")
}
source("renv/activate.R")
} else {
options(repos = c(CRAN = "https://cran.rstudio.com"))
message(
"Using renv profile from `renv/profile` file.\n",
"The `", readLines("./renv/profile"), "` profile will be used."
)
}

if (Sys.getenv("GITHUB_ACTIONS") != "") {
options(repos = c(CRAN = "https://packagemanager.posit.co/cran/latest"))
Sys.setenv("RENV_AUTOLOADER_ENABLED" = FALSE)
}
Sys.setenv("RENV_CONFIG_SANDBOX_ENABLED" = FALSE)
Sys.setenv("RENV_CONFIG_AUTO_SNAPSHOT" = FALSE)
source("renv/activate.R")
2 changes: 2 additions & 0 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:
name: Check
uses: pharmaverse/admiralci/.github/workflows/r-cmd-check.yml@main
if: github.event_name == 'pull_request'
with:
error-on: error
docs:
name: Documentation
uses: pharmaverse/admiralci/.github/workflows/pkgdown.yml@main
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ jobs:
templates:
name: Check Templates
uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@main
if: github.event.review.state == 'approved'
with:
r-version: "4.1"
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ URL: https://pharmaverse.github.io/pharmaverseadam, https://github.com/pharmaver
Encoding: UTF-8
Language: en-US
LazyData: true
LazyDataCompression: bzip2
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Depends: R (>= 3.5)
Expand Down
117 changes: 117 additions & 0 deletions R/adae.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#' Dataset adae
#'
#' adae dataset
#'
#' @name adae
#' @docType data
#' @format A data frame with 101 columns:
#' \describe{
#' \item{ STUDYID }{STUDYID}
#' \item{ DOMAIN }{DOMAIN}
#' \item{ USUBJID }{USUBJID}
#' \item{ AESEQ }{AESEQ}
#' \item{ AESPID }{AESPID}
#' \item{ AETERM }{AETERM}
#' \item{ AELLT }{AELLT}
#' \item{ AELLTCD }{AELLTCD}
#' \item{ AEDECOD }{AEDECOD}
#' \item{ AEPTCD }{AEPTCD}
#' \item{ AEHLT }{AEHLT}
#' \item{ AEHLTCD }{AEHLTCD}
#' \item{ AEHLGT }{AEHLGT}
#' \item{ AEHLGTCD }{AEHLGTCD}
#' \item{ AEBODSYS }{AEBODSYS}
#' \item{ AEBDSYCD }{AEBDSYCD}
#' \item{ AESOC }{AESOC}
#' \item{ AESOCCD }{AESOCCD}
#' \item{ AESEV }{AESEV}
#' \item{ AESER }{AESER}
#' \item{ AEACN }{AEACN}
#' \item{ AEREL }{AEREL}
#' \item{ AEOUT }{AEOUT}
#' \item{ AESCAN }{AESCAN}
#' \item{ AESCONG }{AESCONG}
#' \item{ AESDISAB }{AESDISAB}
#' \item{ AESDTH }{AESDTH}
#' \item{ AESHOSP }{AESHOSP}
#' \item{ AESLIFE }{AESLIFE}
#' \item{ AESOD }{AESOD}
#' \item{ AEDTC }{AEDTC}
#' \item{ AESTDTC }{AESTDTC}
#' \item{ AEENDTC }{AEENDTC}
#' \item{ AESTDY }{AESTDY}
#' \item{ AEENDY }{AEENDY}
#' \item{ TRTSDT }{TRTSDT}
#' \item{ TRTEDT }{TRTEDT}
#' \item{ DTHDT }{DTHDT}
#' \item{ EOSDT }{EOSDT}
#' \item{ ASTDTM }{ASTDTM}
#' \item{ ASTDTF }{ASTDTF}
#' \item{ ASTTMF }{ASTTMF}
#' \item{ AENDTM }{AENDTM}
#' \item{ AENDTF }{AENDTF}
#' \item{ AENTMF }{AENTMF}
#' \item{ ASTDT }{ASTDT}
#' \item{ AENDT }{AENDT}
#' \item{ ASTDY }{ASTDY}
#' \item{ AENDY }{AENDY}
#' \item{ ADURN }{ADURN}
#' \item{ ADURU }{ADURU}
#' \item{ LDOSEDTM }{LDOSEDTM}
#' \item{ ASEV }{ASEV}
#' \item{ AREL }{AREL}
#' \item{ TRTEMFL }{TRTEMFL}
#' \item{ ASEVN }{ASEVN}
#' \item{ AOCCIFL }{AOCCIFL}
#' \item{ SUBJID }{SUBJID}
#' \item{ RFSTDTC }{RFSTDTC}
#' \item{ RFENDTC }{RFENDTC}
#' \item{ RFXSTDTC }{RFXSTDTC}
#' \item{ RFXENDTC }{RFXENDTC}
#' \item{ RFICDTC }{RFICDTC}
#' \item{ RFPENDTC }{RFPENDTC}
#' \item{ DTHDTC }{DTHDTC}
#' \item{ DTHFL }{DTHFL}
#' \item{ SITEID }{SITEID}
#' \item{ AGE }{AGE}
#' \item{ AGEU }{AGEU}
#' \item{ SEX }{SEX}
#' \item{ RACE }{RACE}
#' \item{ ETHNIC }{ETHNIC}
#' \item{ ARMCD }{ARMCD}
#' \item{ ARM }{ARM}
#' \item{ ACTARMCD }{ACTARMCD}
#' \item{ ACTARM }{ACTARM}
#' \item{ COUNTRY }{COUNTRY}
#' \item{ DMDTC }{DMDTC}
#' \item{ DMDY }{DMDY}
#' \item{ TRT01P }{TRT01P}
#' \item{ TRT01A }{TRT01A}
#' \item{ TRTSDTM }{TRTSDTM}
#' \item{ TRTSTMF }{TRTSTMF}
#' \item{ TRTEDTM }{TRTEDTM}
#' \item{ TRTETMF }{TRTETMF}
#' \item{ TRTDURD }{TRTDURD}
#' \item{ SCRFDT }{SCRFDT}
#' \item{ EOSSTT }{EOSSTT}
#' \item{ FRVDT }{FRVDT}
#' \item{ RANDDT }{RANDDT}
#' \item{ DTHADY }{DTHADY}
#' \item{ LDDTHELD }{LDDTHELD}
#' \item{ LSTALVDT }{LSTALVDT}
#' \item{ AGEGR1 }{AGEGR1}
#' \item{ SAFFL }{SAFFL}
#' \item{ RACEGR1 }{RACEGR1}
#' \item{ REGION1 }{REGION1}
#' \item{ LDDTHGR1 }{LDDTHGR1}
#' \item{ DTH30FL }{DTH30FL}
#' \item{ DTHA30FL }{DTHA30FL}
#' \item{ DTHB30FL }{DTHB30FL}
#' }
#'
#' @source Generated from pharmaverse/admiral.
#' @references None
#'
#' @examples
#' data("adae")
"adae"
132 changes: 132 additions & 0 deletions R/adbcva_ophtha.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
#' Dataset adbcva_ophtha
#'
#' adbcva_ophtha dataset
#'
#' @name adbcva_ophtha
#' @docType data
#' @format A data frame with 116 columns:
#' \describe{
#' \item{ STUDYID }{STUDYID}
#' \item{ DOMAIN }{DOMAIN}
#' \item{ USUBJID }{USUBJID}
#' \item{ OESEQ }{OESEQ}
#' \item{ OECAT }{OECAT}
#' \item{ OESCAT }{OESCAT}
#' \item{ OEDTC }{OEDTC}
#' \item{ VISIT }{VISIT}
#' \item{ VISITNUM }{VISITNUM}
#' \item{ VISITDY }{VISITDY}
#' \item{ OESTRESN }{OESTRESN}
#' \item{ OESTRESC }{OESTRESC}
#' \item{ OEORRES }{OEORRES}
#' \item{ OETEST }{OETEST}
#' \item{ OETESTCD }{OETESTCD}
#' \item{ OETSTDTL }{OETSTDTL}
#' \item{ OELAT }{OELAT}
#' \item{ OELOC }{OELOC}
#' \item{ OEDY }{OEDY}
#' \item{ OEMETHOD }{OEMETHOD}
#' \item{ OEORRESU }{OEORRESU}
#' \item{ OESTRESU }{OESTRESU}
#' \item{ OESTAT }{OESTAT}
#' \item{ OETPT }{OETPT}
#' \item{ OETPTNUM }{OETPTNUM}
#' \item{ TRTSDT }{TRTSDT}
#' \item{ TRTEDT }{TRTEDT}
#' \item{ TRT01A }{TRT01A}
#' \item{ TRT01P }{TRT01P}
#' \item{ STUDYEYE }{STUDYEYE}
#' \item{ AVAL }{AVAL}
#' \item{ AVALU }{AVALU}
#' \item{ DTYPE }{DTYPE}
#' \item{ AFEYE }{AFEYE}
#' \item{ PARAM }{PARAM}
#' \item{ PARAMCD }{PARAMCD}
#' \item{ AVALC }{AVALC}
#' \item{ ADT }{ADT}
#' \item{ ADY }{ADY}
#' \item{ ATPTN }{ATPTN}
#' \item{ ATPT }{ATPT}
#' \item{ AVISIT }{AVISIT}
#' \item{ AVISITN }{AVISITN}
#' \item{ BASETYPE }{BASETYPE}
#' \item{ ONTRTFL }{ONTRTFL}
#' \item{ ABLFL }{ABLFL}
#' \item{ ANL01FL }{ANL01FL}
#' \item{ ANL02FL }{ANL02FL}
#' \item{ WORS01FL }{WORS01FL}
#' \item{ BASE }{BASE}
#' \item{ BASEC }{BASEC}
#' \item{ CHG }{CHG}
#' \item{ PCHG }{PCHG}
#' \item{ ASEQ }{ASEQ}
#' \item{ SUBJID }{SUBJID}
#' \item{ RFSTDTC }{RFSTDTC}
#' \item{ RFENDTC }{RFENDTC}
#' \item{ RFXSTDTC }{RFXSTDTC}
#' \item{ RFXENDTC }{RFXENDTC}
#' \item{ RFICDTC }{RFICDTC}
#' \item{ RFPENDTC }{RFPENDTC}
#' \item{ DTHDTC }{DTHDTC}
#' \item{ DTHFL }{DTHFL}
#' \item{ SITEID }{SITEID}
#' \item{ AGE }{AGE}
#' \item{ AGEU }{AGEU}
#' \item{ SEX }{SEX}
#' \item{ RACE }{RACE}
#' \item{ ETHNIC }{ETHNIC}
#' \item{ ARMCD }{ARMCD}
#' \item{ ARM }{ARM}
#' \item{ ACTARMCD }{ACTARMCD}
#' \item{ ACTARM }{ACTARM}
#' \item{ COUNTRY }{COUNTRY}
#' \item{ DMDTC }{DMDTC}
#' \item{ DMDY }{DMDY}
#' \item{ TRTSDTM }{TRTSDTM}
#' \item{ TRTSTMF }{TRTSTMF}
#' \item{ TRTEDTM }{TRTEDTM}
#' \item{ TRTETMF }{TRTETMF}
#' \item{ TRTDURD }{TRTDURD}
#' \item{ SCRFDT }{SCRFDT}
#' \item{ EOSDT }{EOSDT}
#' \item{ EOSSTT }{EOSSTT}
#' \item{ FRVDT }{FRVDT}
#' \item{ RANDDT }{RANDDT}
#' \item{ DTHDT }{DTHDT}
#' \item{ DTHADY }{DTHADY}
#' \item{ LDDTHELD }{LDDTHELD}
#' \item{ LSTALVDT }{LSTALVDT}
#' \item{ AGEGR1 }{AGEGR1}
#' \item{ SAFFL }{SAFFL}
#' \item{ RACEGR1 }{RACEGR1}
#' \item{ REGION1 }{REGION1}
#' \item{ LDDTHGR1 }{LDDTHGR1}
#' \item{ DTH30FL }{DTH30FL}
#' \item{ DTHA30FL }{DTHA30FL}
#' \item{ DTHB30FL }{DTHB30FL}
#' \item{ CRIT1 }{CRIT1}
#' \item{ CRIT1FL }{CRIT1FL}
#' \item{ CRIT2 }{CRIT2}
#' \item{ CRIT2FL }{CRIT2FL}
#' \item{ CRIT3 }{CRIT3}
#' \item{ CRIT3FL }{CRIT3FL}
#' \item{ CRIT4 }{CRIT4}
#' \item{ CRIT4FL }{CRIT4FL}
#' \item{ CRIT5 }{CRIT5}
#' \item{ CRIT5FL }{CRIT5FL}
#' \item{ CRIT6 }{CRIT6}
#' \item{ CRIT6FL }{CRIT6FL}
#' \item{ CRIT7 }{CRIT7}
#' \item{ CRIT7FL }{CRIT7FL}
#' \item{ CRIT8 }{CRIT8}
#' \item{ CRIT8FL }{CRIT8FL}
#' \item{ AVALCA1N }{AVALCA1N}
#' \item{ AVALCAT1 }{AVALCAT1}
#' }
#'
#' @source Generated from pharmaverse/admiralophtha.
#' @references None
#'
#' @examples
#' data("adbcva_ophtha")
"adbcva_ophtha"
Loading

0 comments on commit 66a1210

Please sign in to comment.