netGAM.df: Name: netGAM.df

View source: R/NetGAM_Func.R

netGAM.dfR Documentation

Name: netGAM.df

Description

Description: Fits a gamm to each species in a species abundance dataset and returns a dataframe of the residuals of each gamm. The returned dataframe can be thought of as a species abundance dataframe with a reduced influence of time on the species abundance values. This dataframe can be used as input in downstream network analyses.

Usage

netGAM.df(df, MOY, MCount, clrt = TRUE)

Arguments

df

Species abundance dataframe with samples as rows species as columns.

MOY

Vector that specifies the month of year for each sample (row) in the dataframe (i.e. 1-12).

MCount

Vector that specifies the day of the time-series for each sample (row) in the dataframe (e.g. 1-200).

clrt

If TRUE, the clr transformation in the compositions package is used to clr transform the input species abundance dataframe prior to GAM transformation (default is TRUE). If FALSE, the species abundance data are not clr transformed prior to GAM transformation.

Value

GAM-transformed dataframe (rows = samples, columns = species)


sgleich/NetGAM documentation built on Feb. 15, 2024, 1:13 a.m.