Browse code

Update utilities.R

Set restrict to NULL by default

Ellis Patrick authored on 09/08/2022 08:21:20 • GitHub committed on 09/08/2022 08:21:20
Showing 1 changed files

... ...
@@ -1,7 +1,7 @@
1 1
 # Operates on an input data frame, to extract the outcome column(s) and return
2 2
 # a list with the table of covariates in one element and the outcome in another.
3 3
 # The outcome need to be removed from the data table before predictor training!
4
-.splitDataAndOutcome <- function(measurements, outcome, restrict = "numeric")
4
+.splitDataAndOutcome <- function(measurements, outcome, restrict = NULL)
5 5
 { # DataFrame's outcome variable can be character or factor, so it's a bit involved.
6 6
   if(is.character(outcome) && length(outcome) > 3 && length(outcome) != nrow(measurements))
7 7
     stop("'outcome' is a character variable but has more than one element. Either provide a\n",