Graphics: Plots the time series

View source: R/Graphics.R

GraphicsR Documentation

Plots the time series

Description

Plots the time series

Usage

Graphics(especie, names.especie, esperanza, Variance, Plot.Tipe, Detail)

Arguments

especie

Matrix that contains at row i the bacterial taxa of bacteria i at all time points.

names.especie

Vector with the names of the bacteria in the same order that are placed in the especie matrix.

esperanza

Matrix that contains at row i the expected value of the bacterial taxa i at all time points. The bacteria must be placed in the same order than in especie

Variance

Matrix that contains at row i the variance of the bacterial taxa i at all time points. The bacteria must be placed in the same order than in especie

Plot.Tipe

Character. If Plot.Tipe==Data the function displays a graphic of the dataset, if Plot.Tipe==DataExpected the function displays a graphic of the data and the expected values, if Plot.Tipe==All the function displais a graphic woth the data, the expected values and the variance.If Plot.Tipe==Var the function returns the boxplot of the variance at each time point and the variance of each bacteria. If Plot.Tipe==OnlyVar the function returns the boxplots of the variance at each time points.

Detail

Character. If Detail==no the graphic obtained when Plot.Tipe==DataExpected and Plot.Tipe==All will have the same y axis for all the taxa. If Detail==yes these functions will have different y axis.

Value

Returns the indicated plots.

Examples



names.especie=c("Bact1", "Bact2", "Bact3")
especie=cbind(c(0.5,0.3,0.2), c(0.6,0.3,0.1),c(0.4,0.1,0.5),c(0.4,0.1,0.5))
esperanza=especie[,c(1:3)]+0.1
Variance=matrix(c(runif(9,0.001,0.004)), 3,3)

Graphics(especie, names.especie, esperanza, Variance,"Data","no")
Graphics(especie, names.especie, esperanza, Variance,"DataExpected","no")
Graphics(especie, names.especie, esperanza, Variance,"All","no")

CoDaLoMic documentation built on April 12, 2025, 2:18 a.m.