Learn R Programming

BacArena (version 1.0.1)

growth: Function implementing a growth model of a bacterium

Description

The generic function growth implements different growth models for an object of class Bac.

Usage

growth(object, population, j)
"growth"(object, population, j)

Arguments

object
An object of class Bac.
population
An object of class Arena.
j
The number of the iteration of interest.

Value

Boolean variable of the jth individual indicating if individual died.

Details

Linear growth of organisms is implemented by adding the calculated growthrate by optimizeLP to the already present growth value. Exponential growth of organisms is implemented by adding the calculated growthrate multiplied with the current growth calculated by optimizeLP plus to the already present growth value

See Also

Bac-class, growLin and growExp

Examples

Run this code
data(Ec_core, envir = environment()) #get Escherichia coli core metabolic model
bac <- Bac(Ec_core,deathrate=0.05,
           growthlimit=0.05,growtype="exponential") #initialize a bacterium
arena <- Arena(n=20,m=20) #initialize the environment
addOrg(arena,bac,amount=10) #add 10 organisms
addSubs(arena,40) #add all possible substances
growth(bac,arena,1)

Run the code above in your browser using DataLab