additional ggplot2 stat layer
Posted: Tue May 07, 2024 4:38 pm
I'm trying to develop a module which would plot the result of a cross-tabulation, using 'ggally_crosstable()' function from the 'GGally' package. This function silently uses an additional statistic layer for 'gpplot2', called 'stat_cross' and available in 'ggstats' package. I've declared the importation of both packages in DESCRIPTION and NAMESPACE, still in Jamovi I get the following error in the result panel :
I've tried to use another function, 'ggassoc_crosstab()' from 'descriptio' package, which uses its own additional 'ggplot2' statistic layer ('stat_twocat' from the same 'descriptio' package) and I get the same kind of error. Would you have an idea of a way to get this stat found by Jamovi ?
Code: Select all
Error:
! Can't find stat called "cross"
eval(ev)
eval(ev)
private$.plot_crosstab(image, theme = t$theme, ggtheme = t$ggtheme, ...)
GGally::ggally_crosstable(plotData, mapping = ggplot2::aes(x = x, y = y), fill = "std.resid")
ggally_table(data = data, mapping = mapping, keep.zero.cells = TRUE, geom_tile_args = geom_tile_args, ...)
do.call(geom_tile, geom_tile_args)
(function (mapping = NULL, data = NULL, stat = "identity", position = "identity", ..., linejoin = "mitre", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE)
{
layer(data = data, mapping = mapping, stat = stat, geom = GeomTile, position = position, show.legend = show.legend, inherit.aes = inherit.aes, params = list2(linejoin = linejoin, na.rm = na.rm, ...))
})(colour = "grey50", stat = "cross", keep.zero.cells = TRUE)
layer(data = data, mapping = mapping, stat = stat, geom = GeomTile, position = position, show.legend = show.legend, inherit.aes = inherit.aes, params = list2(linejoin = linejoin, na.rm = na.rm, ...))
check_subclass(stat, "Stat", env = parent.frame(), call = call_env)
cli::cli_abort("Can't find {argname} called {.val {x}}", call = call)
rlang::abort(message, ..., call = call, use_cli_format = TRUE, .frame = .frame)
signal_abort(cnd, .file)