View source: R/scalaDisconnect.R
scalaDisconnect | R Documentation |
This function temporarily disconnects a Scala bridge by closing its
associated socket connections. The primary place where this function is used
is at the end of examples of packages that depend on rscala (because, under
some versions of R, "R CMD check --as-cran
" does not permit
connections to persist after an example ends).
scalaDisconnect(bridge = scalaFindBridge())
bridge |
A Scala bridge. |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.