Advertisement

Converting Data Structures

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

In SAS and SPSS, there is only one data structure, the dataset. Within that, there is only one structure, the variable. It seems absurdly obvious, but we need to say it: all SAS and SPSS procedures accept variables as input. Of course, you have to learn that putting a character variable in where a numeric one is expected causes an error. Occasionally, a character variable contains numbers and we must convert them. Putting a continuous variable in where a categorical variable belongs may not yield an error message, but perhaps it should. Both packages have added variable classification methods (nominal, ordinal, or scale) to help you choose the correct analyses and graphs.

As we have seen, R has several data structures including vectors, factors, data frames, matrices, and lists. For many functions (what SAS/SPSS call procedures), R can automatically provide output optimized for the data structure you give it. Said more formally, generic functions functions apply different methodsto...

Copyright information

© Springer Science+Business Media, LLC 2009

Authors and Affiliations

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

Personalised recommendations