url <- "https://raw.githubusercontent.com/DyerlabTeaching/Data-Containers/main/data/arapat.csv"In Class Components - Data Containers
Examples
This in-class file is used for demonstrating individual examples related to this topic and is kept as a persistent record of examples provided during lectures.
The Data
There are two data sets used for this example;
The iris data set (that comes with R) that describes the sepal and pedal sizes on three species of Iris. This is a classic data set found in a wide variety of data sets and is a great example of having several sample measurements on several individuals in different groups.
Figure 1: Measurements of sepal and pedal lengths and width for three species of iris. Environmental suitability and census data collected by the Dyer lab at various sampling site locales for a species of bark beetle, Araptus attenuatus that we will be using throughout the semester. For this creature, we will be using some data I have stored on Google Drive in a spreadsheet. Instead of downloading the data for everyone, I have shared a URL to it where we can get to it in
Rdirectly. In terms of reproducable research, this is a good thing.™Figure 2: The Sonoran desert bark beetle, Araptus attenuatus.
Vectors
A vector is a list of elements that must be the same class of variable.
Matrices
Matrices are a collection of data types in a 2- or 3-dimensional configuration, often used for mathematical modeling.
Lists
Lists are a structure that allows you to have named variables. Elements may be of different class and sizes.
Data Frames
A data.frame is a dense data container similar to that of a spreadsheet where each column has data of the same type (e..g, Latitude, or Temperature) and each row represents a single record of measurements taken together (same time, same individual, etc.).