timeDecay: Plot the time decay.

Description Usage Arguments Value Examples

View source: R/timeDecay.R

Description

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

Usage

1
2
3
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

1
2
3
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 Oct. 25, 2018, 2:12 p.m.