Learn R Programming

BacArena (version 1.8.2)

plotCurves: Function for plotting the overall change as curves

Description

The generic function plotCurves plots the growth curves and concentration changes of substances from simulation steps in an Eval object.

Usage

plotCurves(
  object,
  medplot = object@mediac,
  retdata = F,
  remove = F,
  legend = F,
  graph = T
)

# S4 method for Eval plotCurves( object, medplot = object@mediac, retdata = F, remove = F, legend = F, graph = T )

Arguments

object

An object of class Eval.

medplot

A character vector giving the name of substances which should be plotted.

retdata

A boolean variable indicating if the data used to generate the plots should be returned.

remove

A boolean variable indicating if substances, which don't change in their concentration should be removed from the plot.

legend

Boolean variable indicating if legend should be plotted

graph

True if graphic should be plotted.

Value

Returns two graphs in one plot: the growth curves and the curves of concentration changes. Optional the data to generate the original plots can be returned.

Details

The parameter retdata can be used to access the data used for the returned plots to create own custom plots.

See Also

Eval-class and Arena-class

Examples

Run this code
# NOT RUN {
data(Ec_core, envir = environment()) #get Escherichia coli core metabolic model
bac <- Bac(Ec_core,deathrate=0.05,
           minweight=0.05,growtype="exponential") #initialize a bacterium
arena <- Arena(n=20,m=20) #initialize the environment
arena <- addOrg(arena,bac,amount=10) #add 10 organisms
arena <- addSubs(arena,40) #add all possible substances
eval <- simEnv(arena,5)
plotCurves(eval)
# }

Run the code above in your browser using DataLab