loadAndCleanEcosystemFunctions: load and clean functions dataset

View source: R/clean_datasets.R

loadAndCleanEcosystemFunctionsR Documentation

load and clean functions dataset

Description

This function loads the functions dataset. It removes all columns mentioned, by default those are all services and the two functions "P loss 2015" and "soil C stock".

Usage

loadAndCleanEcosystemFunctions(
  dataset = "EP grass functions & services.txt",
  path,
  remove = c("Total.flower.cover", "Charism.butterfly.Abund", "Charism.butterfly.SR",
    "SR.birds", "forage.quality", "daily.temp.range", "daily.moisture.range",
    "P_loss2015", "Soil.C.stock")
)

Arguments

dataset

input file

path

path to input file, ending in "/"

remove

vector of column names to remove. Defaults to all services and the two functions "P loss 2015" and "soil C stock".

Details

The function automatically calculates shoot Nitrogen stocks and shoot Phosphorous stocks, both from years 2009 and 2011. Both are calculated by multiplication of the Biomass measured in the given year and the shoot Nitrogen/ Phosphorous stock.

The function further takes the means of variables measured in several years. By default, those are : Nitrogen and Phosphorous stock, Biomass, Phosphorous loss, Phoshporous shoot, Phoshporous in mycorrhiza

Colcomb is used to calculate the mean level of functions which are measured in more than one year. Those are: shootPstock, shootNstock, Biomass, P_loss, Pshoot, Pmic.

This code is written by Eric.

Value

a cleaned functions dataframe


allanecology/multiFunBetadivLuiGDM documentation built on Nov. 12, 2023, 6:16 a.m.