I want to import the variables selected from the step-wise regression process as column names so that I have the \"Output\" has the variables from the step-wise regression as sh
I got this.
selvars=c("Species", attr(satis.step$terms, "term.labels")) datanew <- iris[Species %in% "virginica", ..selvars ] > datanew Species Sepal.Length Petal.Length Petal.Width 1: virginica 6.3 6.0 2.5 2: virginica 5.8 5.1 1.9 3: virginica 7.1 5.9 2.1