m2_parser | R Documentation |
Convert a M2 object into an R object
m2_parse(s)
## Default S3 method:
m2_parse_class(x)
## S3 method for class 'm2_hashtable'
m2_parse_class(x)
## S3 method for class 'm2_optiontable'
m2_parse_class(x)
## S3 method for class 'm2_verticallist'
m2_parse_class(x)
## Default S3 method:
m2_parse_function(x)
## S3 method for class 'm2_hashtable'
m2_parse_function(x)
## S3 method for class 'm2_optiontable'
m2_parse_function(x)
## S3 method for class 'm2_verticallist'
m2_parse_function(x)
## S3 method for class 'm2_symbol'
m2_parse_function(x)
## S3 method for class 'm2_monoid'
m2_parse_function(x)
## S3 method for class 'm2_tocc'
m2_parse_function(x)
## Default S3 method:
m2_parse_object_as_function(x, params)
## S3 method for class 'm2_symbol'
m2_parse_object_as_function(x, params)
## S3 method for class 'm2_integer'
print(x, ...)
## S3 method for class 'm2_float'
print(x, ...)
## S3 method for class 'm2_complex'
print(x, ...)
## S3 method for class 'm2_string'
print(x, ...)
## S3 method for class 'm2_boolean'
print(x, ...)
## S3 method for class 'm2_list'
print(x, ...)
## S3 method for class 'm2_array'
print(x, ...)
## S3 method for class 'm2_sequence'
print(x, ...)
## S3 method for class 'm2_symbol'
print(x, ...)
## S3 method for class 'm2_option'
print(x, ...)
## S3 method for class 'm2_hashtable'
print(x, ...)
## S3 method for class 'm2_module'
print(x, ...)
m2_toggle_gmp()
get_m2_gmp()
s |
a character(1), typically the result of running toExternalString on an M2 object |
x |
an object to be printed |
params |
e.g. |
... |
... |
an R object
D. Kahle, C. O'Neill, and J. Sommars (2020). "A Computer Algebra System for R: Macaulay2 and the m2r Package." Journal of Statistical Software, 93(9):1-31.
## Not run: requires Macaulay2
m2("1+1")
m2.("1+1")
m2_parse(m2.("1+1"))
m2("QQ[x,y]")
m2.("QQ[x,y]")
m2_parse(m2.("QQ[x,y]"))
get_m2_gmp()
m2("3/2") %>% m2_parse()
m2_toggle_gmp() # gmp on
m2("3/2") %>% m2_parse()
m2("6/4") %>% m2_parse()
m2("3345234524352435432/223454325235432524352433245") %>% m2_parse()
m2_toggle_gmp() # gmp off
m2("50!") %>% m2_parse()
m2_toggle_gmp() # gmp on
m2("50!") %>% m2_parse()
m2_toggle_gmp() # gmp off
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.