This particular set of lessons has revisions by Karl Broman for a Data Carpentry workshop at UW-Madison on 23-24 August 2016. The official Data Carpentry R-Ecology lessons are at http://www.datacarpentry.org/R-ecology-lesson/.
Data Carpentry’s aim is to teach researchers basic concepts, skills, and tools for working with data so that they can get more done in less time, and with less pain. The lessons below were designed for those interested in working with Ecology data in R for data analysis.
This is an introduction to R designed for participants with no programming experience. These lessons can be taught in 3/4 of a day. They start with some basic information about R syntax, the RStudio interface, and move through how to import CSV files, the structure of data.frame, how to deal with factors, how to add/remove rows and columns, and finish with how to calculate summary statistics for each level and a very brief introduction to plotting.
Content Contributors: Sarah Supp, John Blischak, Gavin Simpson, Tracy Teal, Greg Wilson, Diego Barneche, Stephen Turner, Francois Michonneau
Lesson Maintainers: Francois Michonneau, Auriel Fournier
Lesson status: Teaching
The data for this lesson is available as a single CSV file, http://kbroman.org/datacarp/portal_data_joined.csv.
We’ll download the file during the course of the lesson.
Data Carpentry’s teaching is hands-on, so participants are encouraged to use their own computers to insure the proper setup of tools for an efficient workflow. These lessons assume no prior knowledge of the skills or tools, but working through this lesson requires working copies of the software described below. To most effectively use these materials, please make sure to install everything before working through this lesson.
R is a programming language that is especially powerful for data exploration, visualization, and statistical analysis. To interact with R, we use RStudio. Make sure you have a recent version of R (3.2.2 or higher).
Install R by downloading and running this .exe file from CRAN. Also, please install the RStudio IDE.
Install R by downloading and running this .pkg file from CRAN. If you have Snow Leopard, you might run into issues when trying to download the datasets directly from R using the `download.file()` function. If it's the case, you will need to download the data files manually. Don't hesitate to ask the instructor for help if you run into issues. Also, please install the RStudio IDE.
You can download the binary files for your distribution
from CRAN. Or
you can use your package manager (e.g. for Debian/Ubuntu
run sudo apt-get install r-base
and for Fedora run
sudo yum install R
). This workshop requires a version of R
no older than version 3.2.2; the default software repositories for some
Linux distributions maybe out of date. It is recommended that you use a
more recent version of R by adding the relevant entries to your package
manager. See the instructions for
your distribution on
the CRAN website. Also, please install the
RStudio IDE.
Twitter: @datacarpentry