Intermediate data wrangling, graphics, and spatial data analysis in “R”

  • Start Date: February 06, 2019
  • End Date: February 08, 2019
  • Time: Feb 6-7: 12:30-6:30 pm; Feb 8: 10:30 am - ~4:30pm
  • City: Revelstoke, BC
  • Venue: Ramada Revelstoke, 1750 Trans Canada Highway (in the meeting room)
  • Instructor: Dr. Carl Schwarz

Course Description

This is not a course in statistics, but rather in using R to solve more advanced problems that go beyond simple statistical analyses. For example, how do I deal with date and time data? Suppose you have 5 years of data and with the same analysis to be done for each year’s data. What is the best way to structure this in R? How do I write a function to do a yearly analysis that is beyond what is commonly available in R? How do I restructure my data to do a similar analysis on 10 separate variables? How do I plot my spatial data on a map? How do I manipulate shape-files? How do I make an interactive graphic (visualization)?

Many users of R quickly outgrow simply uses of R and need to deal with more complicated data manipulation and analyses.


Prerequisites: Basic knowledge of R/Rstudio

Class Size: class size is limited to 16 people.

Bring: Laptop computer pre-loaded with software (see below)

Software Requirements: 

(a) R/Rstudio:
Also install the R packages as listed at this website. Be sure to create your own personal library as noted at the website.

(b) Adobe Reader: Course reading will be available in PDF format. You will need to call up some of the material to read from the
screen during the course. You will be able to annotate the pdf files.

(c) Excel: You will need to unzip files containing example datasets. Datasets are in an Excel workbook that you will need to open
and “paste” into your program.

(d) Text editor: Notepad, WordPad, or Word, to prepare data files for MARK/PRESENCE/GENPRES.

(e) Course Material: Will be available in late January.


Course content

This course builds on the Introduction to R with the following topics:

– dealing with date and time data
– reshaping data from wide to long formats (primarily using the reshape2 package)
– beyond the data frame – the list structure
– split-apply-combine – sub-group analyses (primarily using the plyr package)
– packaging code into functions
– advanced ggplot (faceting, dealing with maps)
– introduction to data visualization (using ggvis and shiny package)
– generating reports (markdown, Sweave)
– basic spatial data analysis (primarily using the sp data classes). Topics for basic spatial data analysis include:

  • basic plotting of points on a google maps/ open street maps
  • importing shape files; sp data structures (polygons, lines, points)
  • basic introduction into projections
  • plotting sp data structures including chorpleth/ bubble/ maps
  • basic operations union/ intersection/ masking/ membership/ closest feature
  • simple regression using spatial data
  • simple logistic regression using spatial data


SchwarzDr. Carl Schwarz, Department of Statistics and Actuarial Science, Simon Fraser University (though soon set to retire!). Carl has taught  many courses with CMI, and is back by popular request! Carl was recently inducted as an American Statistical Association Fellow, and was honored for his contributions in research, teaching, and service. He is a leader in using statistics for ecological problems, especially the development of estimating abundance and other demographic parameters through the use of capture-recapture methods.



Opportunity for snow sports in the morning!

This course will run on a schedule that will allow students to participate in recreational snow activities in the mornings of the dates that the course runs, with the course starting at 12:30pm each day. Revelstoke Mountain Resort (RMR) and the Revelstoke Nordic Ski Club are both close by!

RMR is extending a discount on lift tickets for students of this CMI course. These tickets are valid for the mornings of the dates of the course only. Discounted tickets must be purchased through CMI. See registration section below for more information.

PHOTO: Revelstoke Ski Club members, circa 1891. Revelstoke Museum & Archives photo #1066





  • Phone 250-837-9311
  • Fax 250-837-9311
  • Email

Mailing Address

  • P.O. Box 2568
  • Revelstoke, British Columbia V0E 2S0
Content © Columbia Mountains Institute of Applied Ecology
Site by Perimeter  •  Updated by CMIAE  •  LOGIN