Skip to content

Instantly share code, notes, and snippets.

@shaheeng
Created April 11, 2016 21:20
Show Gist options
  • Save shaheeng/bc17b7d5ebf353ef04d74ec08e1b087f to your computer and use it in GitHub Desktop.
Save shaheeng/bc17b7d5ebf353ef04d74ec08e1b087f to your computer and use it in GitHub Desktop.
#collect names of columns (features) to be used for modelling
allfeatures = setdiff(names(data_classi),c('LabelsCol','splitcol'))
#create formula for modelling
formula = as.formula(paste('LabelsCol',paste(allfeatures,collapse=' + '),sep=' ~ '))
formula
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment