Releases: anders-biostat/jrc
v 0.6.0
Minor fixes
-
onlyServerargument is added to theopenPagefunction to prevent opening a browser tab. -
Bug in the
thisArgargument of thecallFunctionfunction is fixed.
Minor new features and bug fixes
-
setLimitsnow used to set any kind of restriction to memory usage. It replacesnumberOfConnectionsandlimitStorage. Now, also number of processed messages per second or the amount of processed information can be limited, so that the app will not get stuck after receiving too many messages. -
onClosecallback added to theopenPagefunction. It allows specifying actions to be taken when a WebSocket connection is closed (user closes the page). -
getPortadded as a function and as a method of classAppto query for a port number of the running app. -
sendDatanow handles the NAs properly. -
Issue with failing to establish a WebSocket connection to a complex address fixed.
Directory access restrictions
jrc 0.4.0
-
allowedDirectoriesargument is added to theopenPagefunction (and also the corresponding function and methodallowDirectories).
Now user can specify the list of directories that can be accessed by server. By default, it's therootDirectory, the current working
directory and a temporary directory for the current R session. -
Issue with incorrect serving of the file types that are supposed to be send as bytes fixed.
-
jrcnow importsR.utilsfor more robust paths handling.
Support for multiple sessions
-
jrcnow supports multiple connections to a single server and thus can be used to create server apps that are intended
to be used by multiple clients simultaneously. This change requires some additional arguments in some of the functions as well
as several new ones. However, backwards compatibility is maintained. -
jrcnow depends onR6and each app is represented with a single object. One can manage the app with methods of this object,
which allows to run several apps inside one R session. For more information, check man pages of classesAppandSession.
Bug fixes
-
jrcnow works properly on RStudio Server -
sendDatano longer crashes whenkeepAsVector = FALSEand some NAs are present. -
jrcnow works withhttpuv < 1.5.2(it no longer depends onhttpuv::randomPort()). -
jrcnow importsmimefor defining content type when serving a page.
Limiting access to R session from JavaScript
-
Now most of the request from the server must be manually authorized in the R session to prevent misuse of publicly available
apps based on jrc. Functionsauthorize,allowVariables,allowFunctions,limitStoragehave been added. Check their man
pages for more information. -
openPagenow havebrowserargument, which allows to specify a browser to open a page (previously the default browser was
used with no alternatives). -
Function
getPageis added. This function returns the main page-handling object with all the information about current session. -
Function
callFunctionadded on both R and JavaScript sides. It allows to call a function by name, list of arguments and name
of variable to which assign the result. -
Now port for the local server is selected by
httpuv::randomPort()function. User can also provide a port number as an
argument to theopenPagefunction. -
sendDatanow has argumentrowwisewhich allows to send matrices and data.frames to JavaScript not only rowwise (default),
but also columnwise. -
If in
sendDatakeepAsVector = FALSEjrcnow checks recursively for any arrays of length 1 to replace them with scalars
(important for lists). -
Some bugs with changing variable types in
jrc.sendDatafixed.
Renaming fixes
v0.1.1 cran-comments update