introduction to n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Introduction to PowerPoint Presentation
Download Presentation
Introduction to

Loading in 2 Seconds...

play fullscreen
1 / 30

Introduction to - PowerPoint PPT Presentation


  • 72 Views
  • Uploaded on

Introduction to. >. Biodiversity Informatics Training Workshop Boulder, CO. What is R. Open source interpreted programming language and development environment Initially release in 1993 Influenced by the S programming language Focus on statistics, data analysis & graphics

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

Introduction to


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
introduction to

Introduction to

>

Biodiversity Informatics Training Workshop Boulder, CO

what is r
What is R
  • Open source interpreted programming language and development environment
  • Initially release in 1993
  • Influenced by the S programming language
  • Focus on statistics, data analysis & graphics
  • Extensible via user contributed packages
why r
Why R?
  • Reproducible, Repeatable

Therefore a perfect tool for science

  • Method to track data and analytic flow

Therefore a perfect tool for scientists

slide10

R & QGIS Integration

{dismo}, {rgdal}, {rVertnet}

  • GetData
  • Prepare
  • Filter
  • Subset
  • Analyse
  • Model
  • Map Data
  • Derive surfaces
  • Subset
  • Create visuals

Rasters: GeoTiff, .ASC, .BIL,

Vectors: Shapefiles

getting
Getting
  • www.r-project.org
  • Available for Windows, Macintosh, Linux & as Source Code
  • Current release (14 June 2013): R 3.0.1
object based functional language
Object-based functional language
  • What that means to users:

Commands have three parts: arguments, body and its environment. A function is invoked by its name, followed by arguments, which can be named, positional or have defaults if omitted

myvariable <- read.table(x, file = ”data.csv”, sep = ”,”)

objects
Objects
  • Used to store values
  • Case sensitive
  • Named with alphanumeric characters
  • Cannot start with a number
  • Persistent until reassigned or removed from objects list. User rm(obj_name) to remove.
  • Values can be assigned to variables via <- or =
  • Use objects() orls() to view list of objects in the current environment.
getting help
Getting Help
  • ?fxn or help(fxn)

> ?round

extending r
Extending R
  • Via user-created packages available from repositories
    • CRAN (Comprehensive R Archive Network)
    • Bioconductor
installing and using packages
Installing and using Packages
  • Over 4,600 packages available.
  • Package: maps
    • Draw lines and polygons as specified by a map database.
  • Package: mapproj
    • Converts latitude and longitude into projected coordinates. Required by maps package, if we want to use projections other than default (rectangular).
  • Package: maptools
    • Set of tools for manipulating and reading geographic data, in particular ESRI shapefiles. Also installs package sp.
  • Package: sp
    • A package providing classes and methods for spatial data: points, lines, polygons and grids
using packages
Using Packages

Rectangular projection

Bonne equal-area projection

slide20

U.S. Census State Boundaries

Results fromGeoreferencing

filtering data
Filtering Data

StateProvince==“Missouri”

Use logical operators in filter expression: ==, >, <, <=, >=, <>

fishnet 2 collaborative georeferencing project
FishNet 2 Collaborative Georeferencing Project
  • http://geolocate.fishnet2.net/workflow.html
more information
More Information

http://cran.r-project.org/doc/manuals/R-intro.pdf

for loops
for Loops

Syntax: for (name in expr1) expr2

breaking out of loops
Breaking out of Loops

next can be used to discontinue the rest of a particular cycle and skip to the next iteration in the loop

w hile loops
while Loops

Syntax: while (condition) expr

repeat loops
repeat Loops

Syntax: repeat expr

Expression is repeated until break is called