Skip to content

Commit

Permalink
add "preloadData" argument to runJaspResults
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisGoosen committed Sep 26, 2024
1 parent b078ca6 commit bd67821
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions R/common.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ sendFatalErrorMessage <- function(name, title, msg)


#' @export
runJaspResults <- function(name, title, dataKey, options, stateKey, functionCall = name) {
runJaspResults <- function(name, title, dataKey, options, stateKey, functionCall = name, preloadData=FALSE) {
# resets jaspGraphs::graphOptions & options after this function finishes
setOptionsCleanupHook()

Expand Down Expand Up @@ -104,9 +104,10 @@ runJaspResults <- function(name, title, dataKey, options, stateKey, functionCall
}

analysis <- eval(parse(text=functionCall))

dataset <- .fromRCPP(".readDataSetRequestedNative")

dataset <- NULL

if(preloadData)
dataset <- .fromRCPP(".readDataSetRequestedNative")

# ensure an analysis always starts with a clean hashtable of computed jasp Objects
emptyRecomputed()
Expand Down

0 comments on commit bd67821

Please sign in to comment.