Skip to content
Closed
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ inst/doc
*.sqlite
/pkgdown/
/test_data/
*.rds
*.rds
rsconnect/
2 changes: 1 addition & 1 deletion .rscignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ tests
man
.Rprofile
data-raw
.github
.github
30 changes: 29 additions & 1 deletion app.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,39 @@ options( "golem.app.prod" = TRUE)
# update manifest file
# if absolute path is needed for renv profile
# Sys.setenv(RENV_PROFILE = "full")
# Install {clinsight}
# remotes::install_github(
# "openpharma/clinsight",
# ref = "dev",
# force = TRUE
# )
# packageVersion("clinsight")
# renv::snapshot()
# renv::paths$lockfile() # test
# assignInNamespace(
# "renvLockFile",
# \(...) renv::paths$lockfile(),
# "rsconnect"
# )
# rsconnect::writeManifest() # run if needed
clinsight::run_app() # add parameters here (if any)
# clinsight::run_app() # add parameters here (if any)

# Run the application
load_and_run_app <- function(){
app_data_folder <- "./app/"
if(!dir.exists(app_data_folder)) dir.create(app_data_folder)
old_golem_config <- Sys.getenv("GOLEM_CONFIG_ACTIVE")
Sys.setenv("GOLEM_CONFIG_ACTIVE" = "dev")

clinsight::run_app(
data_folder = app_data_folder,
onStart = \(){
onStop(\(){
# unlink(temp_folder, recursive = TRUE);
Sys.setenv("GOLEM_CONFIG_ACTIVE" = old_golem_config)
}
)}
)
}

load_and_run_app()
1 change: 1 addition & 0 deletions clinsight.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: 587215bb-819c-4942-a6c8-4b99d218e8ea

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down
4 changes: 4 additions & 0 deletions dev/02_dev.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ clinsightful_data |>
## install.package('attachment') # if needed.
#attachment::att_amend_desc()

## Add packages ----
# usethis::use_package("")
remotes::instal

## Add modules ----
## Create a module infrastructure in R/
golem::add_module(name = "name_of_module1", with_test = TRUE) # Name of the module
Expand Down
4,350 changes: 1,437 additions & 2,913 deletions manifest.json

Large diffs are not rendered by default.

Loading