Description Usage Arguments Value Examples
Enter a Macaulay2 session
1 | enter_m2(port = 27436L, timeout = 10)
|
port |
port for Macaulay2 socket |
timeout |
number of seconds before aborting |
TRUE
invisibly
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 | ## Not run: requires Macaulay2 be installed and an interactive session
enter_m2()
# m2 code below
1 + 1
a = 1
a
R = QQ[t,x,y,z]
I = ideal(t^4 - x, t^3 - y, t^2 - z)
gens gb I
exit
# back in R, the variable persists using m2()
m2("a")
m2("I")
# we can also define variables in R that persist in m2
m2("b = 5")
enter_m2()
b
exit
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.