## R for SAS and SPSS UsersWhile SAS and SPSS have many things in common, R is very different. My goal in writing this book is to help you translate what you know about SAS or SPSS into a working knowledge of R as quickly and easily as possible. I point out how they differ using terminology with which you are familiar, and show you which add-on packages will provide results most like those from SAS or SPSS. I provide many example programs done in SAS, SPSS, and R so that you can see how they compare topic by topic. When finished, you should be able to use R to: Read data from various types of text files and SAS/SPSS datasets. Manage your data through transformations or recodes, as well as splitting, merging and restructuring data sets. Create publication quality graphs including bar, histogram, pie, line, scatter, regression, box, error bar, and interaction plots. Perform the basic types of analyses to measure strength of association and group differences, and be able to know where to turn to cover much more complex methods. |

### What people are saying - Write a review

We haven't found any reviews in the usual places.

### Contents

5 | |

8 | |

10 | |

11 | |

12 | |

21 | |

Help and Documentation | 41 |

Programming Language Basics | 49 |

Generating Data | 245 |

How R Stores Data | 258 |

Managing Your Files and Workspace | 261 |

Graphics Overview | 273 |

Traditional Graphics | 281 |

Graphics with ggplot2 GPL | 341 |

Statistics | 403 |

Conclusion | 441 |

Data Acquisition | 77 |

Selecting Variables Var Variables | 103 |

Selecting Observations Where If Select If Filter | 123 |

Selecting Both Variables and Observations | 141 |

Converting Data Structures | 143 |

Data Management | 147 |

Value Labels or Formats and Measurement Level | 225 |

Variable Labels | 239 |

Appendix A A Glossary of R Jargon | 443 |

Appendix B A Comparison of SAS and SPSS Products with R Packages and Functions | 449 |

Appendix C Automating Your Settings | 453 |

Appendix D | 457 |

459 | |

463 | |

### Other editions - View all

### Common terms and phrases

aes(pretest aggregate ANOVA argument tells barplot boxplot Chap character vector columns command confidence intervals create data frame data.frame dataset default Example programs factor FALSE function call gender q1 q2 geom geom_point ggplot approach ggplot(mydata100 graph graphical user interface grep help file histogram Hmisc package index numbers install Jitter load logical vector matrix mean function methods Microsoft Windows missing values mtext line multiframe myBys mydata mydataNA myLib.mydata mymatrix myModel myQnames myqs na.rm=TRUE na.strings names(mydata Ó Springer ScienceşBusiness objects options output p-value plot function posttest pretest PROC PRINT procedures q variables qplot qplot(pretest recode regression regular expression Renaming row names SAS and SPSS SAS or SPSS Scatterplot Selecting Observations Selecting Variables setwd("/myRfolder specify Springer ScienceşBusiness Media SPSS Users statistics Table text file traditional graphics value labels variable names window workshop gender q1 workspace