parse.polyMatrix {polyMatrix} | R Documentation |
Parse polynomial matrix from strings
Description
This is a convenient way to input a polynomial matrix.
Usage
parse.polyMatrix(..., var = "x")
Arguments
... |
string or strings to parse |
var |
variable character. Only lower latin characters are allowed except 'e' which is reseved for numbers |
Details
Space and tabulation characters are ignored.
Row should be divided by new line "\n
" or backslash "\
" (TeX style).
Elements in each row can be divided by ",
", ";
" or "&
" (TeX style)
For convenience, this function can accept multiple string. In this case each string will be treated as a new row.
This function accepts TeX matrix format.
Value
new polynomial matrix of polyMatrix class
See Also
Examples
parse.polyMatrix(" 1, 2 + x",
"2 + 2x^2, x^3")
# The function can suggest mistake position in case of invalid format
## Not run:
parse.polyMatrix(
"1 + y & 2\\
-2 & x^2"
)
## Fail to parse polyMatrix: invalid term at position 2 in item [1, 1]
## End(Not run)
[Package polyMatrix version 0.9.16 Index]