Performing a population viability analysis from data students collect on a local plant


During two lab periods, students collect demographic data on perennial plants and then use these data in a matrix model to perform population viability analyses. During the first lab, students tag and record data on individual plants in the field. During the second lab, students compile these data to build transition matrices and then use R to run simulations. In the first year that instructors run this experiment, simulated field data of subsequent years is used to complete the classroom exercises. In subsequent years, students use real data from previous years. No prior experience with R is necessary.


Noah Charney1 and Sydne Record2

1 - School of Natural Science, Hampshire College, 893 West Street, Amherst, MA 01002; noah@alumni.amherst.edu

2 - Harvard University, Harvard Forest, 324 North Main Street, Petersham, MA 01266; srecord@fas.harvard.edu


30-45 minutes in lecture to explain matrix models, 3 hours in the field to collect data, 2-3 hours in lab to analyze data.


30 minutes to enter data into a spreadsheet.


Data sheets and lab worksheet. Instructors may expand the assignment to include writing a full research paper.


Instructor must identify an appropriate perennial species, and sampling should occur where it is abundant enough and when reproductive stages can be determined. Ideally there would be at least 100 plants spread out over an area where different groups of students in the class will be able to sample portions of the population. Analysis takes place in a computer lab with R open-source software.


We have used this lab in 5 different upper-level classes with small lab sections (6-15 students per section): Rare Species Conservation, Conservation Biology, Plant Biology, and Terrestrial Ecology.


We have used this lab at three small liberal arts undergraduate four-year colleges. Two of these colleges were private, and one was public.


This exercise could be performed by majors or non-majors in intro or upper division college courses or in pre-college environments, although the skills taught might be most relevant to college majors. This exercise is easily transferable across geographies and different plant species. Students with physical disabilities may encounter challenges in the field work portion of the lab depending on access to the chosen field site.


  • Full Article Text [doc], [pdf]

Description of other Resource Files:

    R Files:
  • PVA_instructor_script-singleyear.R - an R script for the instructor to set up the lab in the first year of a study. [R]
  • PVA_instructor_script-multiyear.R - an R script for the instructor to set up the lab in subsequent years. [R]
  • PVA_source.R - the R source file which the scripts above reference. This file contains all functions written specifically for this modeling exercise. [R]
  • PVA_student_script.R - the R script file which students are meant to open and use during the computer lab. [R]

  • Word File:
  • PVA_student_handout.docx - a Microsoft Word Document containing an example worksheet for the computer lab portion of the study. [docx]

  • Excel Files:
  • pva_field_sheet_spring2013.xlsx - a Microsoft Excel Spreadsheet containing a field data entry form used for striped pipsissewa (Chimaphila maculata) [xlsx]
  • data_entry_spring2013.xlsx - a Microsoft Excel Spreadhseet used for student entry and submission of the data they collect. This file currently contains fake example data in the first 5 rows. [xlsx]

  • CSV Files:
  • multiyear_data_nostages.csv - a Comma-separated-values file containing the raw data from 3 surveys of our striped pipsissewa study as entered in by students. [csv]
  • this_years_stages.csv - a Comma-separated-values file containing stages of each plant from the first survey of our striped pipsissewa study. Note that Excel might think that the file format is wrong because of the way we have coded the plant ID's in the first column. Ignore the warning in Excel. [csv]
  • multiyear_data_shortform.csv - a Comma-separated-values file containing stages of each plant from three surveys of our striped pipsissewa study, organized into one column for each survey [csv]
  • multiyear_stages_longform.csv - a Comma-separated-values file containing stages of each plant from three surveys of our striped pipsissewa study, with all surveys in a single column [csv]


This exercise would not be possible without support from the open source community of contributors to R statistical software. In particular the code for this exercise depends on the ‘popbio’ package written by C.J. Stubben and B.G. Milligan and the ‘gplots’ package written by Gregory R. Warnes, Ben Bolker, Lodewijk Bonebakker, Robert Gentleman, Wolfgang Huber Andy Liaw, Thomas Lumley, Martin Maechler, Arni Magnusson, Steffen Moeller, Marc Schwartz, and Bill Venables. We thank Dr. Christopher Beck and two anonymous reviewers for assistance with the manuscript. We also thank Dr. Charles Ross for helping to troubleshoot problems when he used this lab in his class.


Noah Charney and Sydne Record. 11 November 2013, posting date. Performing a population viability analysis from data students collect on a local plant Teaching Issues and Experiments in Ecology, Vol. 9: Experiment #2 [online]. http://tiee.esa.org/vol/v9/experiments/charney/abstract.html

A fruiting striped pipsissewa (Chimaphila maculata), tagged by students as part of our ongoing demographic study. Photo by N. D. Charney.

full size image

A budding striped pipsissewa (Chimaphila maculata). Photo by N. D. Charney.

full size image