Jump to main content.

R Guide for psurvey.design_2.2.1

Sections: What is R?, Downloading R, Starting R, Installing & Loading psurvey.design, Help, Script files

What is R?

R is a language and environment for statistical computing and graphics. It is a GNU project which is similar to the S language and environment which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by John Chambers and colleagues. R can be considered as a different implementation of S. There are some important differences, but much code written for S runs unaltered under R. R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, ...) and graphical techniques, and is highly extensible. The S language is often the vehicle of choice for research in statistical methodology, and R provides an Open Source route to participation in that activity. One of R's strengths is the ease with which well-designed publication-quality plots can be produced, including mathematical symbols and formulae where needed. Great care has been taken over the defaults for the minor design choices in graphics, but the user retains full control. R is available as Free Software under the terms of the Free Software Foundation's GNU General Public License in source code form. It compiles and runs on a wide variety of UNIX platforms and similar systems (including FreeBSD and Linux), Windows and MacOS." (from "The R Project for Statistical Computing" web page)

Downloading R
The R statistical analysis program (version 2.2.1) is available for downloading from this site. The EMAP Design Team has not verified that the current versions of psurvey.design (2.2.1) or psurvey.analysis (2.9) are compatable with the several versions of the R Statistical Software. The Team has developed and executed these versions using R 2.2.1. Use of R version 2.2.1 is highly recommended and is available for download from this website. The process for downloading and installing follows.

  • Download R software R-2.2.10-win32, (exe 26.8 MB) [version 2.2.1, Windows (95 and later)]
  • Changes.R-2.2.1 [txt 12 KB] to read about new features of this version.
  • ReadME.R-2.2.1 [txt, 11 kb] to read about installation and usage of this version.
  • Uninstall any previous versions of R and close all programs before completing the next step.
  • Install the file by clicking on "R-2.2.1-win32". This is a Windows 2000 style installer.
  • Follow the standard installation instructions, which will put R into your Start Menu and place an R icon on your Desktop. Installation may take several minutes.
  • At this point R is installed. When R is started, a standard Help menu is available that contains documentation on R.
  • Additional documentation about R is provided on the CRAN web site under the heading "Documentation". Click on "Contributed" to display a list of user-contributed documentation.
  • Starting R

    R may be started from the Start Menu or from the Desktop icon. An important aspect in using R is to keep different projects on which you are working separated. We recommend that a separate folder be created for each project.

    To configure R for use with a project, proceed as follows:

    To start R, click on the R icon in the project folder. R will automatically reference the project folder when accessing and creating data files.


    Installing and Loading R library: psurvey.design

    Help and Function Descriptions

    Text Editors and R

    Using a text editor is recommended for use in conjunction with R. Placing all R commands used in a text file will document how the analysis was completed. If necessary, the text file can be re-executed to duplicate any result or to redo an analysis if data has changed.
    Notepad is available within Windows as one option. Another option is to download NoteTab Light from the NoteTab web site: Notetab.

    The R package now includes script files which largely replace the above text file recommendation. The design examples include R script files, which are easily opened from the File pulldown memu. Highlighting the commands within the script file and then clicking the "Run line or Selection" button is an easy method of excuting the psurvey.design R commands.

    Local Navigation

    Jump to main content.