% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/enter_m2.R
\name{enter_m2}
\alias{enter_m2}
\title{Enter a Macaulay2 session}
\usage{
enter_m2(port = 27436L, timeout = 10)
}
\arguments{
\item{port}{port for Macaulay2 socket}

\item{timeout}{number of seconds before aborting}
}
\value{
\code{TRUE} invisibly
}
\description{
Enter a Macaulay2 session
}
\examples{

\dontrun{ 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

}

}
