Skip to content

Instantly share code, notes, and snippets.

@sjstebbins
Created September 1, 2016 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjstebbins/38389ad348e776d7bca3e5a8c1716587 to your computer and use it in GitHub Desktop.
Save sjstebbins/38389ad348e776d7bca3e5a8c1716587 to your computer and use it in GitHub Desktop.
subset training data
# subset my own training and testing
set.seed(0)
idx = sample.split(dfTrain$Label, SplitRatio = .7)
idx = which(idx == TRUE)
subTrain = dfTrain[idx,]
mytrain = subTrain[, -c(1,32,33)]
subTest = dfTrain[-idx,]
mytest = subTest[, -c(1,32,33)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment