Learn R Programming

caracas (version 2.0.0)

unbracket: Remove inner-most dimension

Description

Remove inner-most dimension

Usage

unbracket(x)

Arguments

x

Array symbol to collapse dimension from

Examples

Run this code
if (has_sympy()) {
  x <- as_sym("[[[x1/(b2 + x1)], 
                 [x2/(b2 + x2)], 
                 [x3/(b2 + x3)]], 
                [[-b1*x1/(b2 + x1)^2], 
                 [-b1*x2/(b2 + x2)^2], 
                 [-b1*x3/(b2 + x3)^2]]]")
  x
  unbracket(x)
  
  x <- as_sym("Matrix([[b1*x1/(b2 + x1)], [b1*x2/(b2 + x2)], [b1*x3/(b2 + x3)]])")
  
}

Run the code above in your browser using DataLab