CLOSED_FORM$as_dataframe | R Documentation |
This function transforms the result generated by gen
to a
data frame.
CLOSED_FORM$as_dataframe(dat, lhs = ".lhs")
dat |
Vector or List. Results generated by |
lhs |
Character. The name of the expression. |
A data frame.
# Constant variable
a <- 1
# Random uniform variable
b <- rand_uniform()
# Define a closed form expression
cf <- closed_form(~3 * (exp(a) + b))
# Generate data
result1 <- cf$gen(10)
cf$as_dataframe(result1)
# Generate data and keep the RHS
result2 <- cf$gen(10, rhs_val = TRUE)
# Specify the name
cf$as_dataframe(result2, lhs = "y")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.