Selecting Variables – Var, Variables=

  • Robert A Muenchen
Part of the Statistics and Computing book series (SCO)

In SAS and SPSS, selecting variables for an analysis is simple while selecting observations is often much more complicated. In R, these two processes can be almost identical. As a result, variable selection in R is both more flexible and quite a bit more complex. However, since you need to learn that complexity to select observations, it is not much added effort.

Selecting observations in SAS or SPSS requires the use of logical conditions with commands like IF, WHERE, SELECT IF, or FILTER. You do not usually use that logic to select variables. It is possible to do so, through the use of macros or, in the case of SPSS, Python, but it is not a standard approach.

If you have used SAS or SPSS for long, you probably know dozens of ways to select observations, but you did not see them all in the first introductory guide you read. With R, it is best to dive in and see all the methods of selecting variables because understanding them is the key to understanding other documentation, especially...


Variable Selection Regular Expression Index Number Data Frame Variable Variable 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Springer Science+Business Media, LLC 2009

Authors and Affiliations

  • Robert A Muenchen
    • 1
  1. 1.University of TennessceKnoxvilleUSA

Personalised recommendations