Import column names from step wise regression in R

后端 未结 1 1698
清酒与你
清酒与你 2021-01-26 16:34

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

相关标签:
1条回答
  • 2021-01-26 17:08

    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
    
    0 讨论(0)
提交回复
热议问题