the r project for statistical computing - spatial-ecology · 2016-05-27 · the r project for...
TRANSCRIPT
The R Project for Statistical Computing
www.r-project.org
A. M. Wilson, G. Amatulli & S. Casalegno
about
● GNU – Free and Open source● Data manipulation● Data analysis tools● Great Graphics● Programming language● 800+ free, user-contributed packages● A supportive and increasing user community
R is a dialect of the S language and environment developed at Bell Laboratories (formerly AT&T) by John Chambers and colleagues. (the same group that developed C and UNIX©)
environment
● an effective data handling and storage facility● a suite of operators for (vectorized) calculations ● a large, coherent, integrated collection of tools for data analysis● graphical capabilities (screen or hardcopy)● a well-developed, simple, and effective programming language
which includes● conditionals● Loops● user defined recursive functions● input and output facilitiesa
community
scientist, blogger, professional, hackers ...
Reproducible, Portable & Transparent
As a scientist, I teach my students that for doing science it is a requirement to work with open source software, because only then workflows are fully transparent and can be reproduced by other scientists without prohibitive license costs.
( Edzer Pebesma – OSGeo - Discuss)
. . . all the code and data used to recreate the Mann’s original analysis has been made available to the public [...] Since the analysis is in R, anyone can replicate the results and examine the methods. (Matthew Pocernich, R news 6/4, 10/31/06)
GRAPHICS if you can imagine...
Spatial data in
● Packages: sp, maptools, raster
see R spatial view
SPATIAL MODELLING
STATISTICAL ANALYSES OF SPATIAL DATA● ex.: SpatialPack package
assess the association between spatial process
Interface with other software
GRASS, QGIS and other spatial & non spatial software and libraries
Command line and GUI
Strengths & Limitations
● Just-in-time compilation: ● Slower than compiled languages (-)● Faster to compose (+) ● Many available packages (+)
● Most operations conducted in RAM● RAM can be limiting and/or expensive (-)● “Error: cannot allocate vector of size X Mb”● Various packages and clever programming can overcome this.. (+)
● Free like beer and speech! (+)
Parallel processing
● HPC and multi-core processors
GPU processing
General workflow
And example commands
Gather Clean
PrepareAnalysis
GraphicsTable
Summaries
WebsitesPresentationsManuscripts
Reports
RawData
WgetAPIs
GdalpktoolsGRASSmergeReshapeopenforismorfeo
ModelsStat functionsRandomForest
XtableTiffKnitrLaTex
Object based programming language
Example objects:● Matrix● Vectors● DataFrames● SpatialDataframes● Lists
Based on adds-on packages
On-line help
● Wikipedia on R http://wiki.r-project.org/rwiki/doku.php● Help at UCLA http://www.ats.ucla.edu/stat/r/● help on packages
http://astrostatistics.psu.edu/datasets/R/html/index.html● Ecological models and data in R, princeton University● http://www.zoology.ufl.edu/bolker/emdbook/● R seek function http://www.rseek.org/● Multi-site search engine
http://www.dangoldstein.com/search_r.html
More help
● MAILING LIST: http://www.r-project.org/mail.html
● R-sig-geo: R Special Interest Group on using Geographical data and Mapping https://stat.ethz.ch/mailman/listinfo/r-sig-geo
● NEWS LETTER http://cran.r-project.org/doc/Rnews/Rnews_2001-3.pdf
● CONFERENCEShttp://www2.agrocampus-ouest.fr/math/useR-2009/
syntax
OutputName object (parameter,[option])←●
myNewMatrix matrix(data = NA, nrow = 2, ncol = 3, ←
byrow = FALSE, dimnames = NULL)
hands on
http://spatial-ecology.net/dokuwiki/doku.php?id=wiki:r