R/data.R

#' Raw root data for the SDEF project.
#'
#' The raw data is available under inst/extdata.
#'
#' Raw data file is .csv and named:
#'
#' "2017_21_07_Grass_and_Adenostoma_root.csv"
#'
#' @name SDEF_root_data_raw
#' @docType data
#' @format A data frame of 1829 rows and 6 columns.
#' \describe{
#'   \item{tube}{MMR tube number, unitless}
#'   \item{tile}{image tile from MMR, increases with depth, unitless}
#'   \item{root}{root number within an image tile, unitless}
#'   \item{date}{date that the image was taken}
#'   \item{length}{length of the root, in mm}
#'   \item{diameter}{diameter of the root, in mm}
#'   ...
#' }
"SDEF_root_data_raw"
#' Raw data from root ashing procedure.
#'
#' Raw .txt. file is located in inst/extdata/SDEF_2016_RootAshWeights.
#' @name SDEF_root_ash_weights
#' @docType data
#' @format A data frame of 11 rows and 8 variables.
#' \describe{
#'   \item{treatment}{either "adenostoma" or "grass", i.e. veg type}
#'   \item{sample}{collection ID, 1-6 for each treatment}
#'   \item{sample_ID}{identifier for sample during processing}
#'   \item{crucible_number}{identifier for sample during processing}
#'   \item{crucible_weight}{crucible weight for mass balance, in grams}
#'   \item{dry_biomass}{dried sample mass, before ashing, in grams}
#'   \item{crucible_ash}{crucible + ash mass, after ashing, in grams}
#'   \item{ash_weight}{ash mass from subtraction, in grams}
#'   ...
#' }
"SDEF_root_ash_weights"
#' Preprocessed root data for the SDEF project.
#'
#' This is the preprocessed root data, in long-form, i.e. pre-aggregation.
#'
#' Process for making it is in the vignette of the same name.
#'
#' @name SDEF_roots_pre_process
#' @docType data
#' @format A data frame of 1825 rows and 9 columns.
#' \describe{
#'   \item{site}{Either 'Adenostoma' or 'Grass'}
#'   \item{tube}{MMR tube number, unitless}
#'   \item{tile}{image tile from MMR, increases with depth, unitless}
#'   \item{root}{root number within an image tile, unitless}
#'   \item{date}{date that the image was taken}
#'   \item{length}{length of the root, in mm}
#'   \item{diameter}{diameter of the root, in mm}
#'   \item{real_depth}{depth below ground of the observed root, in cm}
#'   \item{depth_bin}{categorical depth, 0-9.99, 10-10.99, etc.}
#'   ...
#' }
"SDEF_roots_pre_process"
#' Pre-aggregation root data for the SDEF project.
#'
#' This is partly-processed root data. Biomass has been calculated
#' and some no-longer-relevant data has been omitted for clarity.
#'
#' Each row is a single root.
#'
#' Process for making it is in the vignette of the same name.
#'
#' @name SDEF_roots_pre_aggregation
#' @docType data
#' @format A data frame of 1825 rows and 7 columns.
#' \describe{
#'   \item{site}{Either 'Adenostoma' or 'Grass'}
#'   \item{tube}{MMR tube number, unitless}
#'   \item{date}{date that the image was taken}
#'   \item{length}{length of the root, in mm}
#'   \item{diameter}{diameter of the root, in mm}
#'   \item{depth_bin}{categorical depth, 0-9.99, 10-10.99, etc.}
#'   \item{biomass}{biomass of each root, in grams}
#'   ...
#' }
"SDEF_roots_pre_aggregation"
#' Post-aggregation root data for the SDEF project.
#'
#' This is the processed root data. Each row is a set of roots at a
#' given (1) site, (2) date, and (3) depth bin. Mean root length,
#' mean root diameter, and total (sum) root biomass at each depth bin
#' for each date and each site is given, along with their respective
#' standard deviations and sample sizes.
#'
#' Depth bins are as follows:
#'
#' 1: 0 - 9.99 cm below surface level
#' 2: 10 - 19.99 cm
#' 3: 20 - 29.99 cm
#' 4: 30 - 39.99 cm
#' 5: 40 - 49.99 cm
#' 6: 50 - 60 cm
#'
#' The pre-processing is done in:
#'
#' `SDEF_roots_pre_process`
#'
#' and
#'
#' `SDEF_roots_pre_aggregation`
#'
#' in that order.
#'
#' Process for making this data set is in `SDEF_roots_post_aggregation.Rmd`
#'
#' @name SDEF_roots_post_aggregation_by_date
#' @docType data
#' @format A data frame of 84 rows and 15 columns.
#' \describe{
#'   \item{site}{Either 'Adenostoma' or 'Grass'}
#'   \item{date}{date that the image was taken}
#'   \item{depth_bin}{categorical depth, 0-9.99, 10-10.99, etc.}
#'   \item{mean_length}{average root length of each root group, in mm}
#'   \item{sd_length}{standard deviation of each root group length, in mm}
#'   \item{n_length}{sample size of each root group used in length means}
#'   \item{mean_diameter}{average root diameter of each root group, in mm}
#'   \item{sd_diameter}{standard deviation of each root group diameter, in mm}
#'   \item{n_diameter}{sample size of each root group used in diameter means}
#'   \item{total_biomass}{sum biomass of each root group, in grams}
#'   \item{sd_biomass}{standard deviation of each root group biomass, in grams}
#'   \item{n_biomass}{sample size of each root group used in biomass sums}
#'   \item{mean_biodensity}{mean biodensity of each root group, g cm^-3}
#'   \item{sd_biodensity}{standard deviation of each root group biodensity, g cm^-3}
#'   \item{n_biodensity}{sample size of each root group used in mean biodensity}
#'   ...
#' }
"SDEF_roots_post_aggregation_by_date"
#' Post-aggregation root data for the SDEF project, aggregated by measurement date.
#'
#' This is the processed root data. Each row is a set of roots at a
#' given (1) site, (2) month, and (3) depth bin. Mean root length,
#' mean root diameter, and total (sum) root biomass at each depth bin
#' for each date and each site is given, along with their respective
#' standard deviations and sample sizes.
#'
#' Depth bins are as follows:
#'
#' 1: 0 - 9.99 cm below surface level
#' 2: 10 - 19.99 cm
#' 3: 20 - 29.99 cm
#' 4: 30 - 39.99 cm
#' 5: 40 - 49.99 cm
#' 6: 50 - 60 cm
#'
#' The pre-processing is done in:
#'
#' `SDEF_roots_pre_process`
#'
#' and
#'
#' `SDEF_roots_pre_aggregation`
#'
#' in that order.
#'
#' Process for making this data set is in `SDEF_roots_post_aggregation.Rmd`
#'
#' @name SDEF_roots_post_aggregation_by_month
#' @docType data
#' @format A data frame of 84 rows and 15 columns.
#' \describe{
#'   \item{site}{Either 'Adenostoma' or 'Grass'}
#'   \item{month}{date that the image was taken}
#'   \item{depth_bin}{categorical depth, 0-9.99, 10-10.99, etc.}
#'   \item{mean_length}{average root length of each root group, in mm}
#'   \item{sd_length}{standard deviation of each root group length, in mm}
#'   \item{n_length}{sample size of each root group used in length means}
#'   \item{mean_diameter}{average root diameter of each root group, in mm}
#'   \item{sd_diameter}{standard deviation of each root group diameter, in mm}
#'   \item{n_diameter}{sample size of each root group used in diameter means}
#'   \item{total_biomass}{sum biomass of each root group, in grams}
#'   \item{sd_biomass}{standard deviation of each root group biomass, in grams}
#'   \item{n_biomass}{sample size of each root group used in biomass sums}
#'   \item{mean_biodensity}{mean biodensity of each root group, g cm^-3}
#'   \item{sd_biodensity}{standard deviation of each root group biodensity, g cm^-3}
#'   \item{n_biodensity}{sample size of each root group used in mean biodensity}
#'   ...
#' }
"SDEF_roots_post_aggregation_by_month"
#' Post-aggregation root data for the SDEF project, aggregated by season #1.
#'
#' This is the processed root data. Each row is a set of roots at a
#' given (1) site, (2) month, and (3) depth bin. Mean root length,
#' mean root diameter, and total (sum) root biomass at each depth bin
#' for each date and each site is given, along with their respective
#' standard deviations and sample sizes.
#'
#' Depth bins are as follows:
#'
#' 1: 0 - 9.99 cm below surface level
#' 2: 10 - 19.99 cm
#' 3: 20 - 29.99 cm
#' 4: 30 - 39.99 cm
#' 5: 40 - 49.99 cm
#' 6: 50 - 60 cm
#'
#' The pre-processing is done in:
#'
#' `SDEF_roots_pre_process`
#'
#' and
#'
#' `SDEF_roots_pre_aggregation`
#'
#' in that order.
#'
#' The time aggregation here is one of five options:
#' `date`, `month`, `season_v1`, `season_v2`, and `season_v3`.
#' Date and month are self explanatory.
#'
#' `season_v1` aggregates October and December to `Winter`,
#' January and February to `Early Spring`, and March and May to `Late Spring`.
#'
#' `season_v2` aggregates October and December to `Winter`,
#' January and February to `Early Spring`, and leaves March and May as months.
#'
#' `season_v3` aggregates October, December, and January as `Winter`,
#' February and March as `Early Spring`, and leaves May as its own month.
#' May here could also be `Late Spring`.
#'
#' Process for making this data set is in `SDEF_roots_post_aggregation.Rmd`
#'
#' @name SDEF_roots_post_aggregation_by_season_v1
#' @docType data
#' @format A data frame of 23 rows and 15 columns.
#' \describe{
#'   \item{site}{Either 'Adenostoma' or 'Grass'}
#'   \item{season_v1}{categorical bin, details above}
#'   \item{depth_bin}{categorical depth, 0-9.99, 10-10.99, etc.}
#'   \item{mean_length}{average root length of each root group, in mm}
#'   \item{sd_length}{standard deviation of each root group length, in mm}
#'   \item{n_length}{sample size of each root group used in length means}
#'   \item{mean_diameter}{average root diameter of each root group, in mm}
#'   \item{sd_diameter}{standard deviation of each root group diameter, in mm}
#'   \item{n_diameter}{sample size of each root group used in diameter means}
#'   \item{total_biomass}{sum biomass of each root group, in grams}
#'   \item{sd_biomass}{standard deviation of each root group biomass, in grams}
#'   \item{n_biomass}{sample size of each root group used in biomass sums}
#'   \item{mean_biodensity}{mean biodensity of each root group, g cm^-3}
#'   \item{sd_biodensity}{standard deviation of each root group biodensity, g cm^-3}
#'   \item{n_biodensity}{sample size of each root group used in mean biodensity}
#'   ...
#' }
"SDEF_roots_post_aggregation_by_season_v1"
#' Post-aggregation root data for the SDEF project, aggregated by season #2.
#'
#' This is the processed root data. Each row is a set of roots at a
#' given (1) site, (2) month, and (3) depth bin. Mean root length,
#' mean root diameter, and total (sum) root biomass at each depth bin
#' for each date and each site is given, along with their respective
#' standard deviations and sample sizes.
#'
#' Depth bins are as follows:
#'
#' 1: 0 - 9.99 cm below surface level
#' 2: 10 - 19.99 cm
#' 3: 20 - 29.99 cm
#' 4: 30 - 39.99 cm
#' 5: 40 - 49.99 cm
#' 6: 50 - 60 cm
#'
#' The pre-processing is done in:
#'
#' `SDEF_roots_pre_process`
#'
#' and
#'
#' `SDEF_roots_pre_aggregation`
#'
#' in that order.
#'
#' The time aggregation here is one of five options:
#' `date`, `month`, `season_v1`, `season_v2`, and `season_v3`.
#' Date and month are self explanatory.
#'
#' `season_v1` aggregates October and December to `Winter`,
#' January and February to `Early Spring`, and March and May to `Late Spring`.
#'
#' `season_v2` aggregates October and December to `Winter`,
#' January and February to `Early Spring`, and leaves March and May as months.
#'
#' `season_v3` aggregates October, December, and January as `Winter`,
#' February and March as `Early Spring`, and leaves May as its own month.
#' May here could also be `Late Spring`.
#'
#' Process for making this data set is in `SDEF_roots_post_aggregation.Rmd`
#'
#' @name SDEF_roots_post_aggregation_by_season_v2
#' @docType data
#' @format A data frame of 31 rows and 15 columns.
#' \describe{
#'   \item{site}{Either 'Adenostoma' or 'Grass'}
#'   \item{season_v2}{categorical bin, details above}
#'   \item{depth_bin}{categorical depth, 0-9.99, 10-10.99, etc.}
#'   \item{mean_length}{average root length of each root group, in mm}
#'   \item{sd_length}{standard deviation of each root group length, in mm}
#'   \item{n_length}{sample size of each root group used in length means}
#'   \item{mean_diameter}{average root diameter of each root group, in mm}
#'   \item{sd_diameter}{standard deviation of each root group diameter, in mm}
#'   \item{n_diameter}{sample size of each root group used in diameter means}
#'   \item{total_biomass}{sum biomass of each root group, in grams}
#'   \item{sd_biomass}{standard deviation of each root group biomass, in grams}
#'   \item{n_biomass}{sample size of each root group used in biomass sums}
#'   \item{mean_biodensity}{mean biodensity of each root group, g cm^-3}
#'   \item{sd_biodensity}{standard deviation of each root group biodensity, g cm^-3}
#'   \item{n_biodensity}{sample size of each root group used in mean biodensity}
#'   ...
#' }
"SDEF_roots_post_aggregation_by_season_v2"
#' Post-aggregation root data for the SDEF project, aggregated by season #3.
#'
#' This is the processed root data. Each row is a set of roots at a
#' given (1) site, (2) month, and (3) depth bin. Mean root length,
#' mean root diameter, and total (sum) root biomass at each depth bin
#' for each date and each site is given, along with their respective
#' standard deviations and sample sizes.
#'
#' Depth bins are as follows:
#'
#' 1: 0 - 9.99 cm below surface level
#' 2: 10 - 19.99 cm
#' 3: 20 - 29.99 cm
#' 4: 30 - 39.99 cm
#' 5: 40 - 49.99 cm
#' 6: 50 - 60 cm
#'
#' The pre-processing is done in:
#'
#' `SDEF_roots_pre_process`
#'
#' and
#'
#' `SDEF_roots_pre_aggregation`
#'
#' in that order.
#'
#' The time aggregation here is one of five options:
#' `date`, `month`, `season_v1`, `season_v2`, and `season_v3`.
#' Date and month are self explanatory.
#'
#' `season_v1` aggregates October and December to `Winter`,
#' January and February to `Early Spring`, and March and May to `Late Spring`.
#'
#' `season_v2` aggregates October and December to `Winter`,
#' January and February to `Early Spring`, and leaves March and May as months.
#'
#' `season_v3` aggregates October, December, and January as `Winter`,
#' February and March as `Early Spring`, and leaves May as its own month.
#' May here could also be `Late Spring`.
#'
#' Process for making this data set is in `SDEF_roots_post_aggregation.Rmd`
#'
#' @name SDEF_roots_post_aggregation_by_season_v3
#' @docType data
#' @format A data frame of 24 rows and 15 columns.
#' \describe{
#'   \item{site}{Either 'Adenostoma' or 'Grass'}
#'   \item{season_v3}{categorical bin, details above}
#'   \item{depth_bin}{categorical depth, 0-9.99, 10-10.99, etc.}
#'   \item{mean_length}{average root length of each root group, in mm}
#'   \item{sd_length}{standard deviation of each root group length, in mm}
#'   \item{n_length}{sample size of each root group used in length means}
#'   \item{mean_diameter}{average root diameter of each root group, in mm}
#'   \item{sd_diameter}{standard deviation of each root group diameter, in mm}
#'   \item{n_diameter}{sample size of each root group used in diameter means}
#'   \item{total_biomass}{sum biomass of each root group, in grams}
#'   \item{sd_biomass}{standard deviation of each root group biomass, in grams}
#'   \item{n_biomass}{sample size of each root group used in biomass sums}
#'   \item{mean_biodensity}{mean biodensity of each root group, g cm^-3}
#'   \item{sd_biodensity}{standard deviation of each root group biodensity, g cm^-3}
#'   \item{n_biodensity}{sample size of each root group used in mean biodensity}
#'   ...
#' }
"SDEF_roots_post_aggregation_by_season_v3"
#' Preprocessed sapflux data for the 2016 SDEF project.
#'
#' The raw data is available under inst/extdata/Adenostoma_2016_mphillips in
#' the source package.
#'
#' The raw data files are described in the vignette used to make the dataset:
#'
#' `Adenostoma_2016_mphillips_preprocessed.Rmd`
#'
#' Note that preprocessing takes ca. 2.5 hours on a 4-core laptop.
#'
#' @name Adenostoma_2016_mphillips_preprocessed
#' @docType data
#' @format A 23Mb object of class 'flux', 'data' slot is a matrix with 52350
#'         rows and 22 columns. Includes metadata and raw data.
#' \describe{
#'   \item{raw.data}{Raw data, list of 12 files}
#'   \item{source.files}{Filenames associated with raw.data}
#'   \item{data}{Pre-processed sapflow data, as a matrix}
#'   \item{data.tags}{Tags associated with the data, i.e. colnames}
#'   \item{time}{Data timestamps, as class `POSIXct``}
#'   \item{date}{Date timestamps, as class `Date`}
#'   \item{datatype}{Type of data, see `sapflux` documentation}
#'   \item{metadata}{Associated metadata, d.f. of 22 rows and 12 cols}
#'   \item{log}{Processing log output by the `sapflux` functions}
#' }
"Adenostoma_2016_mphillips_preprocessed"
#' Processed sapflux data for the 2016 SDEF project.
#'
#' This object is daily data - no running average.
#'
#' Preprocessing is described in `Adenostoma_2016_mphilips_preprocess.Rmd`
#'
#' @name Adenostoma_2016_mphillips_processed_noavg
#' @docType data
#' @format A dataframe of 191 rows and 2 columns
#' \describe{
#'   \item{day}{Day of the observation, as POSIXct}
#'   \item{max_flux}{maximum observed flux}
#' }
"Adenostoma_2016_mphillips_processed_noavg"
#' Processed sapflux data for the 2016 SDEF project.
#'
#' This object is a running average of daily data.
#'
#' Preprocessing is described in `Adenostoma_2016_mphilips_preprocess.Rmd`
#'
#' @name Adenostoma_2016_mphillips_processed_withavg
#' @docType data
#' @format A dataframe of 191 rows and 2 columns
#' \describe{
#'   \item{day}{Day of the observation, as POSIXct}
#'   \item{max_flux}{2-wk running avg. of maximum obs. flux}
#' }
"Adenostoma_2016_mphillips_processed_withavg"
bmcnellis/SDEF.analysis documentation built on June 4, 2019, 10 a.m.