| Title: | Companion to the 'xeus-r' 'jupyter' Kernel |
|---|---|
| Description: | Set of R functions to be coupled with the 'xeus-r' 'jupyter' kernel in order to drive execution of code in notebook input cells, how R objects are to be displayed in output cells, and handle two way communication with the front end through comms. |
| Authors: | Romain François [aut, cre], QuantStack [cph] |
| Maintainer: | Romain François <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.6.0.9000 |
| Built: | 2026-06-05 06:16:23 UTC |
| Source: | https://github.com/jupyter-xeus/xeus-r |
Options for current jupyter cell
cell_options(...)cell_options(...)
... |
options to set locally to the notebook cell. Forwarded to |
## Not run: cell_options(repr.plot.bg = "gray") ## End(Not run)## Not run: cell_options(repr.plot.bg = "gray") ## End(Not run)
Clear output
clear_output(wait = FALSE)clear_output(wait = FALSE)
wait |
Should this wait |
NULL invisibly
## Not run: clear_output() ## End(Not run)## Not run: clear_output() ## End(Not run)
Comm class
Comm class
idid of the comm. read only.
target_namename of the target for this comm
new()
Comm$new(xp, description = "")
xpexternal pointer to an instance of the C++ class 'xeus::xcomm'
descriptiondescription of this comm
open()
Comm$open(data = NULL, metadata = NULL)
datadata
metadatametadata
close()
Comm$close(data = NULL, metadata = NULL)
datadata
metadatametadata
send()
Comm$send(data = NULL, metadata = NULL)
datadata
metadatametadata
on_close()
Comm$on_close(handler)
handlerfunction to call when the comm is closed
on_message()
Comm$on_message(handler)
handlerfunction to call when receiving a message
print()
Comm$print()
information about the comm
clone()
The objects of this class are cloneable with this method.
Comm$clone(deep = FALSE)
deepWhether to make a deep clone.
Instance of the CommManagerClass class.
CommManagerCommManager
An object of class CommManagerClass (inherits from R6) of length 11.
new()
CommManagerClass$new(..., error_call = caller_env())
...currently unused
error_callregister_comm_target()
CommManagerClass$register_comm_target(
target_name,
callback = function(comm, message) {
}
)target_namename of the comm target, e.g. "jupyter.widgets"
callbackcallback function taking two arguments 'comm' and 'message'.
unregister_comm_target()
CommManagerClass$unregister_comm_target(target_name)
target_namename of the comm target
new_comm()
CommManagerClass$new_comm(target_name, description = "")
target_namename of the target
descriptiondescription of the comm
comms()
CommManagerClass$comms()
the list of currently open comms
target_callback()
CommManagerClass$target_callback(target_name)
target_namename of the comm target
the callback for that target name
preserve()
CommManagerClass$preserve(comm)
commComm instance to preserve
release()
CommManagerClass$release(comm)
commComm instance to release
get_comm_info()
CommManagerClass$get_comm_info(target_name = NULL)
target_namename of the target to get info about all comm opens. If NULL, info for comms for all targets are returned.
clone()
The objects of this class are cloneable with this method.
CommManagerClass$clone(deep = FALSE)
deepWhether to make a deep clone.
Code completion
complete(code, cursor_pos = nchar(code))complete(code, cursor_pos = nchar(code))
code |
R code to complete |
cursor_pos |
position of the cursor |
a list that contains potential completions as the first item
complete("rnorm(")complete("rnorm(")
Display data
display_data(data = NULL, metadata = NULL)display_data(data = NULL, metadata = NULL)
data |
data to display |
metadata |
potential metadata |
## Not run: display_data(mtcars) ## End(Not run)## Not run: display_data(mtcars) ## End(Not run)
Is this a running xeusr jupyter kernel
is_xeusr()is_xeusr()
TRUE if the current session is running in a xeusr kernel
is_xeusr()is_xeusr()
bundle an object
mime_bundle(x, mimetypes = mime_types(x), ...)mime_bundle(x, mimetypes = mime_types(x), ...)
x |
an object |
mimetypes |
mime types |
... |
extra currently unused parameters |
IRdisplay::prepare_mimebundle which this currently wraps around
mime_bundle(letters)mime_bundle(letters)
MIME types supported by an object
mime_types(x)mime_types(x)
x |
an object |
a character vector of its supported mime types
mime_types(letters) mime_types(mtcars)mime_types(letters) mime_types(mtcars)
View
View(x, title)View(x, title)
x |
something to display |
title |
title of the display |
## Not run: View(mtcars) ## End(Not run)## Not run: View(mtcars) ## End(Not run)