linear_expand_expr {lazy.symbolic} | R Documentation |
Lienarly Distribute Functions
Description
Lienarly Distribute Functions
Usage
linear_expand_expr(
expr,
...,
exchangable_ops = c(""),
most_out = c("+", "-"),
type = c("binary", "unary", "both")
)
Arguments
expr |
an expression or a string |
... |
strings containing function names |
exchangable_ops |
??? |
most_out |
??? |
type |
??? |
Value
an expression
Note
再帰解決系
Examples
linear_expand_expr("tr(A-B)", "tr", "inv")
linear_expand_expr("inv(tr(A-B)) %*% C", "tr")
linear_expand_expr("tr(A-B+C)", "tr")
linear_expand_expr("A-B", "tr")
linear_expand_expr("A%*%(X-B)", "%*%")
linear_expand_expr("tr(A%*%(X-B))", "tr", "%*%", "(")
linear_expand_expr("(A-B)*(A-B)", "*")
[Package lazy.symbolic version 1.0.0.20250803 ]