Plus {lazy.symbolic} | R Documentation |
Sum of Two or More Symbolic Expression
Plus(..., simplify = 1, debug = 0)
... |
Symbolic matrices or vectors to be added. |
simplify |
= 0 not to use Simplify nor remove_paren |
debug |
= 1 to print intermediate result |
Tow matrices of the same dimensions can be added or subtraced.
A scalar can be added to or subtracted from a matrix
Numeric matrices will be treated as character ones.
When you want to chage the sign of all the elements of a matrix, use
A1 <- Minus( 0, A ) or A1 <- matTimes( -1, A )
If the arguments are super matrices with SMdim attributes, the final result will have an appropriate SMdim attribute.
A character matrix
A <- demomat(3,3,root="a") A[2,2] <- paste("-",A[2,2],sep="") B <- demomat(3,3,root="b") B[3,3] <- 0 Plus( A, B ) Plus( A, 1 )