# \donttest{
showConnections()
s <- scala()
showConnections() # No additional connections yet.
s * "3+4"
showConnections() # Now there are two additional connections.
scalaDisconnect()
showConnections() # The new connections are gone.
s * "3+4"
showConnections() # New connections are established as needed.
close(s)
# }
Run the code above in your browser using DataLab