| eqnlist | R Documentation |
The eqnlist object stores an ODE as a list of stoichiometric matrix, rate expressions, state names and compartment volumes.
Translates a reaction network, e.g. defined by a data.frame, into an equation list object.
eqnlist(
smatrix = NULL,
states = colnames(smatrix),
rates = NULL,
volumes = NULL,
description = NULL
)
as.eqnlist(data, volumes)
## S3 method for class 'data.frame'
as.eqnlist(data, volumes = NULL)
is.eqnlist(x)
smatrix |
Matrix of class numeric. The stoichiometric matrix, one row per reaction/process and one column per state. |
states |
Character vector. Names of the states. |
rates |
Character vector. The rate expressions. |
volumes |
Named character, volume parameters for states. Names must be a subset of the states.
Values can be either characters, e.g. "V1", or numeric values for the volume. If |
description |
Character vector. Description of the single processes. |
data |
data.frame with columns Description, Rate, and one colum for each state reflecting the stoichiometric matrix |
x |
object of class |
... |
additional arguments to be passed to or from methods. |
If data is a data.frame, it must contain columns "Description" (character),
"Rate" (character), and one column per ODE state with the state names.
The state columns correspond to the stoichiometric matrix.
An object of class eqnlist, basically a list.
Object of class eqnlist
# Generate eqnlist from the constructor
S <- matrix(c(-1, 1, 1, -1),
nrow = 2, ncol = 2,
dimnames = list(NULL, c("A", "B")))
rates <- c("k1*A", "k2*B")
description <- c("forward", "backward")
f <- eqnlist(smatrix = S, rates = rates, description = description)
print(f)
# Convert to data.frame
fdata <- as.data.frame(f)
print(fdata)
# Generate eqnlist from data.frame and add volume parameter
f <- as.eqnlist(fdata, volumes = c(A = "Vcyt", B = "Vnuc"))
print(f)
print(as.eqnvec(f))
print(as.eqnvec(f, type = "amount"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.