Skip to content

Commit

Permalink
fix: userKernel -> kernelComputation
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceyyu committed Oct 1, 2024
1 parent 1693620 commit f47f4ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/gwalkr.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#' @param visConfig An optional config string to reproduce your chart. You can copy the string by clicking "export config" button on the GWalkR interface.
#' @param visConfigFile An optional config file path to reproduce your chart. You can download the file by clicking "export config" button then "download" button on the GWalkR interface.
#' @param toolbarExclude An optional list of strings to exclude the tools from toolbar UI. However, Kanaries brand info is not allowed to be removed or changed unless you are granted with special permission.
#' @param kernelComputation An optional boolean to enable the kernel mode computation which is much more efficient. Default is FALSE.
#'
#' @return An \code{htmlwidget} object that can be rendered in R environments
#'
Expand All @@ -33,7 +34,7 @@
#' gwalkr(mtcars)
#'
#' @export
gwalkr <- function(data, lang = "en", dark = "light", columnSpecs = list(), visConfig = NULL, visConfigFile = NULL, toolbarExclude = list(), useKernel = FALSE) {
gwalkr <- function(data, lang = "en", dark = "light", columnSpecs = list(), visConfig = NULL, visConfigFile = NULL, toolbarExclude = list(), kernelComputation = FALSE) {
if (!is.data.frame(data)) stop("data must be a data frame")
if (!is.null(visConfig) && !is.null(visConfigFile)) stop("visConfig and visConfigFile are mutually exclusive")
lang <- match.arg(lang, choices = c("en", "ja", "zh"))
Expand All @@ -45,7 +46,7 @@ gwalkr <- function(data, lang = "en", dark = "light", columnSpecs = list(), visC
visConfig <- readLines(visConfigFile, warn=FALSE)
}

if (useKernel) {
if (kernelComputation) {
gwalkr_kernel(data, lang, dark, rawFields, visConfig, toolbarExclude)
} else {
x = list(
Expand Down
4 changes: 3 additions & 1 deletion man/gwalkr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f47f4ca

Please sign in to comment.