Skip to content

libSBML R package power function is pow() instead of ^ #353

@LeonieLorenz

Description

@LeonieLorenz

When reading in an SBML file that contains a rule with the power function (), the R package translates it into pow(x,y) which is not defined in R. Instead you would want the result to be x^y or x**y.


Here is a snippet from the SBML model that I am reading and the resulting R code below.

SBML (from BioModels BIOMD0000000982):

beta_0 1 p time

R (based on libSBML tutorial):

formulaToString( Rule_getMath(Model_getRule(m,5)))
[1] "beta_0 * pow(1 - p, time)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions