I work on a script which I want to apply to multiple outcome variables which I try to define in the beginning of the script and then be able to modify it easily
at the beginning I have something like
outcome_variable <<- "parameter244"
In most components of my script it works if I simply use outcome_variable from then on instead of parameter244 but in the following function it doesn't work – I think I have to escape the variable somehow...
index.training <- createDataPartition(analyze_data.norm$outcome_variable, p = 0.8, list = FALSE) %>% as.vector()
it works with
index.training <- createDataPartition(analyze_data.norm$parameter244, p = 0.8, list = FALSE) %>% as.vector()