This is an R tutorial for working with the data from the PFTC3 in Wayqecha, Peru. The purpose of the tutorial is to be able to download the data, read them and understand their structure before playing with them.
The PFTC3 was held at Wayqecha, Cusco, Peru, following the general outline of the PFTC courses. The PFTC3 used two main study systems; we studied the variability of plant functional traits, ecosystem fluxes and photosynthesis along an elevational gradient and along a gradient in time since fire using locations with different fire histories previously studied by Immaculada Oliveras (Oliveras et al., 2014a).
The PFTC3 consisted of four main student group projects:
Our studies are conducted in six grassland sites in the southeastern Peruvian Andes of Perú, in the buffer zone of the Manu National Park, department of Cusco. These tropical alpine grasslands are located above the upper treeline limit of the cloud forest, often referred to as puna vegetation.
The majority of the research sites were established in March 2018, and three new sites were established in April 2019. At each site, we sampled sub-sites with different fire history when available, attempting to create a fire chronosequence independent of the elevational gradient. This was restricted by the availability of sites with different fire histories at different elevations.
First, is important to install all packages needed. The code in the file “setup.R” will do this and check you have a recent version of R.
library("tidyverse")
library("dataDownloader")
library("DBI")
library("vegan")
library("ggvegan")
library("patchwork")
library("glue")
Download the data and store it in the proper files
# Instructions to download the Data
# Location of PFTC Data
# The data are located in OSF repository
# To know the exact location of each PFTC Data check this file:
# https://docs.google.com/spreadsheets/d/1y81Xv33BaoWV2FNx0F9XbikjKeHLGNxfmWZ2w4xmISk/edit#gid=0
## COMMUNITY DATA
# Peru community data for the gradient:
get_file(node = "7mzjk", remote_path = "Peru",
file = "PFTC3.1_CommunityCover_2018_Peru.csv",
path = "community/data")
## TRAIT DATA
get_file(node = "7mzjk", remote_path = "Peru",
file = "PFTC3.7_Traits_2018_Peru_cleaned.csv",
path = "traits/data")
## Carbon flux
get_file(node = "7mzjk", remote_path = "Peru",
file = "standardControlFluxPE_2016.Rdata",
path = "Cflux/data")
The community data are located in Peru/community/data.
com <- read_csv(file = "community/data/PFTC3.1_CommunityCover_2018_Peru.csv")
The traits data are located in Peru/traits/data, in a single file. To read the csv file:
traits <- read_csv(file = "traits/data/PFTC3.7_Traits_2018_Peru_cleaned.csv")
The Carbon fluxes data are located in Peru/Cflux/data, in a single file. To read the csv file:
Cflux <- load(file = "Cflux/data/standardControlFluxPE_2016.Rdata")
head(Cflux)
#> [1] "standardControlFluxPE_2016"