re_sym | R Documentation |
Refresh as symbol
re_sym(x)
x |
caracas symbol |
caracas symbol
if (has_sympy()) {
x <- symbol('x', positive=TRUE)
e <- 2*x^2
## Substitute 2 for x
subs(e, "x", 2)
## Fails because of restriction that x is positive
## Refresh symbol
e <- re_sym(e)
## Works
subs(e, "x", "2") ## OK
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.