Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

changeObjFunc

Sets/changes the Objective Function


Description

The function changeObjFunc changes or sets the objective function for a specified model.

Usage

changeObjFunc(model, react, obj_coef = rep(1, length(react)))

Arguments

model

An object of class modelorg.

react

An object of class reactId, character or integer. Specifies the fluxes (variables) for which to change the objective coefficients.

obj_coef

A numerical vector with length equal to the number of reaction id's given in argument react containing the objective coefficients.
Default: a value of one for each reaction given in argument react.

Details

The argument react will be evaluated by the function checkReactId. The return value is used to change the objective function.

All reactions not given in argument react will get an objective value of zero.

Value

Returns the given model containing the new objective function.

Author(s)

Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de>

Maintainer: Mayo Roettger <mayo.roettger@hhu.de>

See Also

Examples

## sets the objective function to the ATP maintenance reaction:
  data(Ec_core)
  Ec_new <- changeObjFunc(Ec_core, "ATPM")

sybil

Efficient Constrained Based Modelling

v2.1.5
GPL-3 | file LICENSE
Authors
Mayo Roettger [cre], Gabriel Gelius-Dietrich [aut], C. Jonathan Fritzemeier [ctb], Rajen Piernikarczyk [ctb], Marc Andre Daxer [ctb], Benjamin Braasch [ctb], Abdelmoneim Desouki [ctb], Martin J. Lercher [ctb]
Initial release
2019-03-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.