[banner]

An R Companion for the Handbook of Biological Statistics

Salvatore S. Mangiafico

Help with R

It’s always a good idea to check the help information for a function before using it.  Don’t necessarily assume a function will perform a test as you think it will.  The help information will give the options available for that function, and often those options make a difference with how the test is carried out.

 

Help in R

In order to see the help file for the chisq.test function:

 

?chisq.test

 

In order to specify the chisq.test function in the stats package, you would use:

 

?stats::chisq.test

 

or

 

help(chisq.test, package=stats)

 

In order to search all installed packages for a term:

 

??"chi-square"

 

In order to view the help for a package

 

help(package=psych)

 

CRAN documentation

Documentation for packages are also available in a .pdf format, which may be more convenient than using the help within R.  Also very helpful, some packages include vignettes, which describe how a package might be used.

 

For a list of available packages, visit cran.r-project.org/web/packages/available_packages_by_name.html.

 

And clicking on the link for the psych package, will bring up a page with a link for the .pdf documentation, two .pdf vignettes, and other information.

 

Summary and Analysis of Extension Education Program Evaluation in R

Most of the analyses in this book are also presented in Summary and Analysis of Extension Education Program Evaluation in R (SAEEPER).  It may be useful for the reader to consult that book for additional examples and discussion.

 

Other online resources

Since there are many good resources for R online, an internet search for your question or analysis including the term “r” will often lead to a solution.  The reader is cautioned, however, to always check the original R documentation on functions to be sure it will perform an analysis as the user desires.

 

A convenient tool is the RSiteSearch function, which will open a browser window and search for a term in functions and vignettes across a variety of sources: 

 

RSiteSearch("chi-square test")

 

This tool can also be accessed from:  http://search.r-project.org/nmz.html.