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
data.frame
Data files for the lesson are available here: http://dx.doi.org/10.6084/m9.figshare.1314459
Please download the *.csv (Comma Separated Value) files: species.csv, plots.csv, surveys.csv, and combined.csv.
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