-
Notifications
You must be signed in to change notification settings - Fork 0
/
globalConstants.R
58 lines (45 loc) · 1.55 KB
/
globalConstants.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# globalConstants
# Constants for consistent look and feel. Things like plotting
# size, colours, resolution.
###############################################################################
library(HEOR)
RUN <- TRUE
if(RUN){
GC <- new.env()
with(GC,
{
##### R Version #####
#specify at least one R version used for analysis
R.VERSION <- c("4.0.2")
##### DATA #####
# How to read and store working data
READ.FST <- TRUE # Will fall back to csv if not
READ.CSV <- !READ.FST # Mutually exclusive with reading fst
WRITE.FST <- READ.FST || TRUE # Has to be true if reading fst
WRITE.CSV <- READ.CSV || TRUE
##### SEEED #####
#Specify random seed for random number generators
SEED <- 19280903
###### BOOTSTRAP #####
# Number of threads for parallel clusters. NULL will use detectCores(logical = FALSE)
THREADS <- NULL
# Specify if parallel computing should be used
PARALLEL <- TRUE
##### PLOTTING #####
# Specify file extension for plots
PLOT.EXTENSION <- "png" # Default
##### SURVIVAL #####
# Specify type of CI for Kaplan-Meier Plots
KM.CONF.TYPE <- "log-log" # Default confidence intervals - here for parity
# with SAS
##### IDs #####
INDEX.ID.COL <- "uid"
COMPARATOR.ID.COL <- "uid"
##### DATE DETAILS #####
#DY2MN <- 1/30.4375
DY2MN <- 1/30
DY2YR <- 1/360
##### FURTHER DETAILS #####
#specify further variables here
})
}