read_forresdat_table: load tables from git repository 'forresdat'

View source: R/read_forresdat_table.R

read_forresdat_tableR Documentation

load tables from git repository forresdat

Description

This function reads a table in .csv format from git repository forresdat (and saves the forresdat data to a local temp directory to avoid unneeded downloading in the future). Data available in forresdat only contains observations, so no records with zero values are added for for instance species that were not observed and hence absent. These zero value records can easily be added by using the function add_zeros(). To load table plotinfo, set argument join_plotinfo = FALSE.

Usage

read_forresdat_table(
  tablename,
  join_plotinfo = TRUE,
  plottype = c("CP", "CA", "all")
)

Arguments

tablename

name of the table that should be read

join_plotinfo

should table plotinfo be joined to the chosen table to add columns forest_reserve, survey_dendro/deadw/reg/veg (TRUE or FALSE) and data_processed (TRUE or FALSE)? Default is TRUE. (This is only possible if the given table contains a column plot_id, so this parameter should be put FALSE if this column is absent.) Must be FALSE if you want to load the table plotinfo itself.

plottype

Data of which plottype (used method) should be retrieved? Default is 'CP' or 'circle plot', alternatively 'CA' or 'core area', or 'all' (retrieve both circle plots and core areas) could be chosen.

Value

A dataframe with the specified table, default columns plottype, forest_reserve, survey_dendro/deadw/reg/veg (TRUE or FALSE) and data_processed (TRUE or FALSE). To be able to recall the version of the data, this dataframe contains an attribute with the version number of the release of forresdat from which the data are taken.

Examples

library(forrescalc)
data_dendro <- read_forresdat_table(tablename = "dendro_by_plot")
data_dendro
attr(data_dendro, "forresdat")


inbo/forrescalc documentation built on Sept. 28, 2024, 11:45 a.m.