PBalance: Calculating balances

View source: R/PBalance.R

PBalanceR Documentation

Calculating balances

Description

This function calculates the balance that has at the numerator the bacteria placed at Num and has at the denominator the bacteria placed at Dem

Usage

PBalance(A, Num, Dem, especie)

Arguments

A

Number. The balance will be calculated for t=1,2,...,A time points.

Num

vector that contains the position in the matrix especies of the families that we position at the numerator of the balance.

Dem

vector that contains the position in the matrix especies of the families that we position at the denumerator of the balance

especie

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

Value

Returns a vector with the value of the balance in each time point.

Examples


especie1=cbind(c(0.5,0.3,0.1,0.1), c(0.1,0.3,0.6,0.1))
Num=c(1,2)
Dem=c(3,4)
A=2
PBalance(A,Num,Dem,especie1)


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