add_residuals: Returns a melted data table of species and their scaled cmps...

View source: R/core_mimosa2_funcs.R

add_residualsR Documentation

Returns a melted data table of species and their scaled cmps (based on model coefficient), along with residual contributions

Description

Returns a melted data table of species and their scaled cmps (based on model coefficient), along with residual contributions

Usage

add_residuals(species_cmps, model_dat, resid_dat)

Arguments

species_cmps

data table of species and their CMPs

model_dat

Table of model results (from fit_cmp_mods)

resid_dat

Table of model residuals (from fit_cmp_mods)

Value

A melted data table of species and their CMPs, including "Residual" as an additional species

Examples

add_residuals(species_cmps, mod_results[[1]], mod_results[[2]])

borenstein-lab/mimosa2 documentation built on Dec. 19, 2024, 12:44 a.m.