Learn R Programming

mlxR (version 4.2.0)

inlineModel: inline model

Description

Define a model "inline"

Usage

inlineModel(str, filename = NULL)

Arguments

str

model

filename

name of the temporary model file

Value

A Shiny app with files ui.R, server.R and model.txt

Details

A temporary model file filename is created. Default name is "tempModel.txt". filename="random" generates a random name.

Examples

Run this code
# NOT RUN {
myModel1 <- inlineModel("
[LONGITUDINAL]
EQUATION:
f = 10*exp(-0.2*t)
")

print(myModel1)

r <- simulx(model=myModel1, output=list(name="f", time=0:100))

myModel2 <- inlineModel("
[LONGITUDINAL]
EQUATION:
f = 10*exp(-0.2*t)
", filename="random")

print(myModel2)
# }

Run the code above in your browser using DataLab