Skip to content

Commit 3e14022

Browse files
committed
export shared_data() helper
1 parent bbbea57 commit 3e14022

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ export(renderPlotly)
176176
export(schema)
177177
export(select)
178178
export(select_)
179+
export(shared_data)
179180
export(showRGB)
180181
export(signup)
181182
export(slice)

R/plotly_data.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,17 @@ print.plotly_data <- function(x, ...) {
8888
x
8989
}
9090

91+
#' Shared data
92+
#'
93+
#' This is simply a wrapper around `crosstalk::SharedData$new()` to make it easier
94+
#' to use and explain conceptually.
95+
#'
96+
#' @param ... arguments passed to crosstalk::SharedData$new()
97+
#' @export
98+
#' @return An object of class [crosstalk::SharedData]
99+
shared_data <- function(...) {
100+
crosstalk::SharedData$new(...)
101+
}
91102

92103
#' @rdname plotly_data
93104
#' @export

man/shared_data.Rd

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)