| biogeme_database_define_variable | R Documentation |
Define a derived database variable using a complete Biogeme expression
biogeme_database_define_variable(database, name, expression)
database_define_variable(database, name, expression)
define_variable(database, name, expression)
database |
A |
name |
Name of the derived column. |
expression |
Complete Biogeme expression. |
The expression is retained symbolically and is compiled by the Python bridge together with the model. It is not evaluated by an R callback during estimation or simulation.
A new database specification.
database <- biogeme_database(
"demo",
data.frame(time = c(10, 12), cost = c(5, 6))
)
database <- biogeme_database_define_variable(
database, "time_cost", variable("time") / variable("cost")
)
biogeme_database_columns(database)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.