Description Usage Arguments Examples
Utility tools for M2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
x |
an object of class |
value |
the value to assign |
m2_attr |
the name of an M2 attribute |
m2_name |
|
m2_class |
|
m2_meta |
|
base_class |
a base class; an R class to use for dispatching
if there is no relevant method for the other classes (e.g.
|
name |
a string; the name of a M2 object |
all.names |
if |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ## Not run: requires Macaulay2
m2("a = 5")
m2_ls()
m2_exists("a")
m2("b = 1")
m2_exists(c("a","b","c"))
m2_getwd()
x <- 1
class(x) <- "m2"
attr(x, "m2_meta") <- list(a = 1, b = 2)
m2_meta(x)
m2_meta(x, "b")
m2_meta(x, "b") <- 5
m2_meta(x, "b")
# R <- ring(c("x1", "x2", "x3"))
# m2_name(R)
# m2(sprintf("class %s", m2_name(R)))
# m2_ls()
# m2_rm(m2_name(R))
# m2_ls()
# m2(paste("class", m2_name(R)))
m2_ls()
m2_ls(all.names = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.