Skip to content

Commit 289a9c6

Browse files
committed
minor tweaks to indentation
1 parent da576f8 commit 289a9c6

4 files changed

Lines changed: 32 additions & 29 deletions

File tree

AUC user defined interval/AUCt for user defined interval.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ library(dplyr)
1010
library(pracma)
1111

1212

13+
1314
if (exists("debugSource"))
1415
Simcyp::Initialise("C://Program files//Simcyp simulator v23//screens//systemfiles", 23)
1516
setwd("~/V23 Cobicistat")

Forest plot/Simcyp R package - forest plot example.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# 2. How to extract the necessary data for forest plots
66
# 3. How to use those data to make a forest plot
77

8+
89
# Housekeeping ----------------------------------------------------------------
910
library(Simcyp)
1011
library(RSQLite)

Summary Stats and Ribbon Plots/Summary Statistic and Ribbon Plots with Simcyp-R Package.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Clear Global Environment ----
33
rm(list=ls())
44

5-
# 1. Load Packages ----
5+
# 1. Load Packages -----
66
# Required packages for Simcyp-R
77
library("Simcyp")
88
library("RSQLite")

Tuning ODE Solver Parameters with R Package/e-learning.R

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ rtol <- c(1e-1 ^ (1:3), 1e-1 ^ (1:3), 1e-1 ^ (1:3))
1313
atol <- rtol * 1e-2
1414

1515
res.df <- data.frame(matrix(ncol = 6, nrow = Tot_iter,
16-
dimnames = list(NULL, c("method","rtol","atol",
17-
"mean_time","sd_time","subjects_negC"))))
16+
dimnames = list(NULL, c("method","rtol","atol",
17+
"mean_time","sd_time","subjects_negC"))))
1818

1919
res.df$method <- solvName[solv[1:Tot_iter]]
2020
res.df$rtol <- rtol
@@ -29,12 +29,12 @@ SetWorkspace("V23_B305_minPBPK_ADAM_CLiv.wksz") # 10 x 10 workspace
2929
db_file <- array( dim = Tot_iter )
3030

3131
for( iter in 1 : Tot_iter ){
32-
db_file[iter] <- paste0("sim_",sprintf("%004d",iter),".db")
33-
34-
# Simcyp::SetSolver( solv[iter],
35-
# rtol = rtol[iter], atol = atol[iter], maxsteps = 1e+07 )
36-
#
37-
# Simulate( database = db_file[iter] )
32+
db_file[iter] <- paste0("sim_",sprintf("%004d",iter),".db")
33+
34+
# Simcyp::SetSolver( solv[iter],
35+
# rtol = rtol[iter], atol = atol[iter], maxsteps = 1e+07 )
36+
#
37+
# Simulate( database = db_file[iter] )
3838
}
3939

4040
Simcyp::Uninitialise()
@@ -44,25 +44,26 @@ Simcyp::Uninitialise()
4444
Simcyp::Initialise(species = SpeciesID$Human, verbose = FALSE)
4545

4646
for( iter in 1 : Tot_iter ){
47-
conn <- RSQLite::dbConnect( SQLite(), db_file[iter] )
48-
49-
# SIMULATION DURATIONS
50-
PopResults <- dbGetQuery( conn, "SELECT * FROM PopResults10" )
51-
sim_duration <- PopResults$SimulationDuration
52-
53-
res.df$mean_time[iter] <- mean( sim_duration )
54-
res.df$sd_time[ iter] <- sd( sim_duration )
55-
56-
# NO. OF SUBJECTS WITH A NEGATIVE CONC
57-
negC <- vector()
58-
for(k in 1:100){
59-
Csys <- GetProfile_DB(ProfileID$Csys, compound = CompoundID$Substrate, individual = k, conn, inhibition = FALSE)
60-
negC[k] <- as.numeric( 0 < sum( ( Csys < 0) ) ) # there is a neg conc or not
61-
}
62-
63-
res.df$subjects_negC[iter] <- sum( negC )
64-
65-
RSQLite::dbDisconnect( conn )
47+
conn <- RSQLite::dbConnect( SQLite(), db_file[iter] )
48+
49+
# SIMULATION DURATIONS
50+
PopResults <- dbGetQuery( conn, "SELECT * FROM PopResults10" )
51+
sim_duration <- PopResults$SimulationDuration
52+
53+
res.df$mean_time[iter] <- mean( sim_duration )
54+
res.df$sd_time[ iter] <- sd( sim_duration )
55+
56+
# NO. OF SUBJECTS WITH A NEGATIVE CONC
57+
negC <- vector()
58+
for(k in 1:100){
59+
Csys <- GetProfile_DB(ProfileID$Csys, compound = CompoundID$Substrate, individual = k, conn, inhibition = FALSE)
60+
negC[k] <- as.numeric( 0 < sum( ( Csys < 0) ) ) # there is a neg conc or not
61+
}
62+
63+
res.df$subjects_negC[iter] <- sum( negC )
64+
65+
RSQLite::dbDisconnect( conn )
6666
}
6767

68-
Simcyp::Uninitialise()
68+
Simcyp::Uninitialise()
69+

0 commit comments

Comments
 (0)