Selecting Observations – Where, If, Select If, Filter

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

It bears repeating that the approaches that R uses to select observations are, for the most part, the same as those discussed previously for selecting variables. This chapter focuses only on selecting observations. The examples and descriptions parallel the previous chapter as closely as possible. While some may view this as dull repetition, I view it as a helpful review of topics that will initially seem quite odd to SAS and SPSS users. It also allows you read each topic independently for future reference.

Selecting Observations in SAS and SPSS

There are many ways to select observations in SAS and SPSS and it is outside our scope to discuss them all here. However, we will look at one method for comparison purposes. For both SAS and SPSS, if you do not select observations, it assumes you want to analyze all the data. So in SAS:PROC MEANS;VAR workshop– –q4;RUN;will analyze all the observations. And in SPSS:DESCRIPTIVES VARIABLES=workshop TO q4.will also use all observations.

To select a...


Regular Expression Index Number Data Frame Character Vector Summary Function 
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