An Introduction to S and The Hmisc and Design Libraries Carlos Alzola, MS Frank Harrell, PhD Statistical Consultant Professor of Biostatistics 401 Glyndon Street SE Department of Biostatistics Vienna, Va 22180 Vanderbilt University School of Medicine
[email protected] S-2323 Medical Center North Nashville, Tn 37232
[email protected] http://biostat.mc.vanderbilt.edu/RS September 24, 2006 ii Updates to this document may be obtained from biostat.mc.vanderbilt.edu/RS/sintro.pdf. Contents 1 Introduction 1 1.1 S, S-Plus, R, and Source References ........................... 1 1.1.1 R ........................................... 4 1.2 Starting S .......................................... 4 1.2.1 UNIX/Linux .................................... 4 1.2.2 Windows ...................................... 5 1.3 Commands vs. GUIs .................................... 7 1.4 Basic S Commands ..................................... 7 1.5 Methods for Entering and Saving S Commands ..................... 9 1.5.1 Specifying System File Names in S ........................ 11 1.6 Differences Between S and SAS .............................. 11 1.7 A Comparison of UNIX/Linux and Windows for Running S .............. 18 1.8 System Requirements ................................... 19 1.9 Some Useful System Tools ................................. 19 2 Objects, Getting Help, Functions, Attributes, and Libraries 25 2.1 Objects ........................................... 25 2.2 Getting Help ........................................ 25 2.3 Functions .........................................