background preloader

Rtips. Revival 2012!

Rtips. Revival 2012!
Paul E. Johnson <pauljohn @ ku.edu> The original Rtips started in 1999. It became difficult to update because of limitations in the software with which it was created. Now I know more about R, and have decided to wade in again. You are reading the New Thing! The first chore is to cut out the old useless stuff that was no good to start with, correct mistakes in translation (the quotation mark translations are particularly dangerous, but also there is trouble with ~, $, and -. (I thought it was cute to call this “StatsRus” but the Toystore’s lawyer called and, well, you know…) If you need a tip sheet for R, here it is. This is not a substitute for R documentation, just a list of things I had trouble remembering when switching from SAS to R. Heed the words of Brian D. 1.1 Bring raw numbers into R (05/22/2012) This is truly easy. myDataFrame <- read.table(‘‘myData’’,header=TRUE) If you type “? Suppose you have tab delimited data with blank spaces to indicate “missing” values. Patience is the key. ?

knitr: Elegant, flexible and fast dynamic report generation with R | knitr Overview The knitr package was designed to be a transparent engine for dynamic report generation with R, solve some long-standing problems in Sweave, and combine features in other add-on packages into one package (knitr ≈ Sweave + cacheSweave + pgfSweave + weaver + animation::saveLatex + R2HTML::RweaveHTML + highlight::HighlightWeaveLatex + 0.2 * brew + 0.1 * SweaveListingUtils + more). This package is developed on GitHub; for installation instructions and FAQ’s, see README. This website serves as the full documentation of knitr, and you can find the main manual, the graphics manual and other demos / examples here. For a more organized reference, see the knitr book. Motivation One of the difficulties with extending Sweave is we have to copy a large amount of code from the utils package (the file SweaveDrivers.R has more than 700 lines of R code), and this is what the two packages mentioned above have done. Features Acknowledgements Misc

Software - Miquel De Cáceres Ainsa Indicspecies R package Indicator species are species that are used as ecological indicators of community or habitat types, environmental conditions, or environmental changes. In order to determine indicator species, the characteristic to be predicted is represented in the form of a classification of the sites, which is compared to the patterns of distribution of the species found in that set of sites. 'Indicspecies' is an R package that contains a set of functions to assess the strength of relationship between species and a classification of sites. As such, it includes the well-known IndVal method (Dufrêne & Legendre 1997) and extends it by allowing the user to study combinations of site groups (De Cáceres et al. 2010). Apart from the IndVal index, the package allows computing many other indices suitable for this kind of associations (De Cáceres & Legendre 2009), such as the phi coefficient of association. Download indicspecies (ver. 1.6.7) from CRAN. Resniche R package STI R package

Statistics with R Warning Here are the notes I took while discovering and using the statistical environment R. However, I do not claim any competence in the domains I tackle: I hope you will find those notes useful, but keep you eyes open -- errors and bad advice are still lurking in those pages... Should you want it, I have prepared a quick-and-dirty PDF version of this document. The old, French version is still available, in HTML or as a single file. You may also want all the code in this document. 1. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.

Common Concepts in Statistics [M.Tevfik DORAK] Genetics Population Genetics Genetic Epidemiology Bias & Confounding Evolution HLA MHC Homepage M.Tevfik Dorak, MD, PhD Please use this address next time: See also Common Terms in Mathematics; Statistical Analysis in HLA & Disease Association Studies; Epidemiology (incl. For more LINKS, see the end of this page [Please note that the best way to find an entry is to use the Find option from the Edit menu, or CTRL + F] Absolute risk: Probability of an event over a period of time; expressed as a cumulative incidence like 10-year risk of 10% (meaning 10% of individuals in the group of interest will develop the condition in the next 10 year period). Accuracy: The degree to which a parameter (like the mean) is immune systematic error or bias. Addition rule: The probability of any of one of several mutually exclusive events occurring is equal to the sum of their individual probabilities. ANCOVA: See covariance models.

Ecological Models and Data in R This is the web site for a book published by Princeton University Press (ISBN 0691125228). It is available from Princeton University Press and Amazon.com. Data and scripts for labs: Other data and scripts: Most of the data for the book are available in the emdbook package on CRAN. Most of the R code for doing things in the book is now in the two packages bbmle (also available in a development version) and emdbook, both available from R archive (CRAN) or via install.packages from inside R. Other miscellaneous R code: pdfhtmlxmlRnwR Warning: everything below here may be somewhat out of date ...If you want to see the existing notes for the course, start here. Old PDFs An old draft: 3 August 2007 (PDF, 6 MB). Individual chapters Last update: 27 December 2006 Formats: PDF, Rnw (Sweave -- original "source code"), R (R code only)

Related: