# NOT RUN {
# Remove a range of columns. Generally, the columns containing the labels or
# redundant values (such as all 0's) should be removed before training the model.
trim_data("1,2", data.frame(x1=sample(1:100,10),
x2=sample(500:1000, 10), x3=sample(-100:0,10)))
# Remove a single column.
trim_data("2", data.frame(x1=sample(1:100,10),
x2=sample(500:1000, 10), x3=sample(-100:0,10)))
# }
Run the code above in your browser using DataLab