Install Juniper Kernel
installJuniper(useJupyterDefault = FALSE, kernelName = defaultKernelName(),
displayName = defaultDisplayName(), prefix = "")
If TRUE
, install the kernel in a default Jupyter kernel location fashion. For macOS,
the default Jupyter kernel location is ~/Library/Jupyter/kernels
. For Windows, the
default Jupyter kernel location is %APPDATA%\jupyter\kernels
. For Linux this directory is
~/.local/share/jupyter/kernels
.
If FALSE
, the kernel is installed system-wide. For unix-based machines,
the system-level directory is /usr/share/jupyter/kernels
or
/usr/local/share/jupyter/kernels
. For Windows, the location is
%PROGRAMDATA%\jupyter\kernels
.
If the prefix
argument is specified, then the useJupyterDefault
parameter is ignored.
A character string representing the location of the kernel. This is required
to be made up of alphanumeric and .
, _
, -
characters only.
This is enforced with a check against this ^[a-zA-Z_][a-zA-Z0-9_.-]*$
regex.
The case of this argument is always ignored and is tolower
ed; so while it's
allowed to have mixed-case characters, the resulting location will not be. A warning
will be issued if there is mixed-case characters. The default for this
juniper_r
concatenated with the major.minor
version of R. For example,
for R 3.4.0, the default would be juniper_r3.4.0
.
A character string representing the name of the kernel in a client. There are no
restrictions on the display name. The default for R 3.4.0 is R 3.4.0 (Juniper)
.
A character string specifying the virtual env
that this kernel should be installed
to. The install location will be prefix/share/jupyter/kernels
.
Use this method to install the Juniper Kernel. After a successful invocation
of this method, Juniper will be an available kernel for all Jupyter front-end
clients (e.g., the dropdown selector in the Notebook interface). This method
is essentially a wrapper on the function call jupyter kernelspec install
with some extra configuration options. These options are detailed as the parameters
below. One important note to make is that the kernel will depend the R
environment
that doing the invoking. In this way a user may install kernels for different versions
of R by invoking this installJuniper
method from each respective R. The defaults
for kernelName
and displayName
are good for avoiding namespacing issues
between versions of R, but installs having the same kernel name replace an existing
kernel.
# NOT RUN {
installJuniper(useJupyterDefault = TRUE) # install into default Jupyter kernel location
# }
Run the code above in your browser using DataLab