timeDecay: Plot the time decay.

View source: R/timeDecay.R

timeDecayR Documentation

Plot the time decay.

Description

Plot time elapsed against the community dissimilarity for all possible pairs of time points.

Usage

timeDecay(x, time = c(1:ncol(x)), dissim = "bray", normtaxa = FALSE,
  logdissim = FALSE, logtime = FALSE, header = "", units = "",
  plot = TRUE)

Arguments

x

a taxon matrix with rows representing taxa and columns samples

time

vector with time steps

dissim

sample dissimilarity to use, should be supported by vegdist

normtaxa

divide each taxon vector in x by its sum

logdissim

take the logarithm of the dissimilarity before fitting a line

logtime

take the logarithm of the time interval before fitting a line

header

a string to be appended to the plot title (Time decay)

units

a string to describe the units of the time points (days, weeks etc)

plot

whether to do the plot

Value

a list with the time intervals, dissimilarity values, intersection, slope, p-value, adjusted R2, dissimilarity measure used and log status of dissimilarity measure

Examples

data("david_stoolA_otus")
data=rarefyFilter(david_stoolA_otus,min=10000)[[1]]
out.decay=timeDecay(data[,1:50], header="Stool subject A")

hallucigenia-sparsa/seqtime documentation built on Jan. 9, 2023, 11:53 p.m.