R Under development (unstable) (2023-11-05 r85474 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(crosstalk) > > test_check("crosstalk") ClntVl> library(shiny) ClntVl> server <- function(input, output, session) { ClntVl+ cv <- ClientValue$new("var1", "group1") ClntVl+ ClntVl+ r <- reactive({ ClntVl+ # Don't proceed unless cv$get() is a non-NULL value ClntVl+ validate(need(cv$get(), message = FALSE)) ClntVl+ ClntVl+ runif(cv$get()) ClntVl+ }) ClntVl+ ClntVl+ observeEvent(input$click, { ClntVl+ cv$sendUpdate(NULL) ClntVl+ }) ClntVl+ } bscols> ## No test: bscols> ##D library(htmltools) bscols> ##D bscols> ##D # If width is unspecified, equal widths will be used bscols> ##D bscols( bscols> ##D div(style = css(width="100%", height="400px", background_color="red")), bscols> ##D div(style = css(width="100%", height="400px", background_color="blue")) bscols> ##D ) bscols> ##D bscols> ##D # Use NA to absorb remaining width bscols> ##D bscols(widths = c(2, NA, NA), bscols> ##D div(style = css(width="100%", height="400px", background_color="red")), bscols> ##D div(style = css(width="100%", height="400px", background_color="blue")), bscols> ##D div(style = css(width="100%", height="400px", background_color="green")) bscols> ##D ) bscols> ##D bscols> ##D # Recycling widths bscols> ##D bscols(widths = c(2, 4), bscols> ##D div(style = css(width="100%", height="400px", background_color="red")), bscols> ##D div(style = css(width="100%", height="400px", background_color="blue")), bscols> ##D div(style = css(width="100%", height="400px", background_color="red")), bscols> ##D div(style = css(width="100%", height="400px", background_color="blue")) bscols> ##D ) bscols> ## End(No test) bscols> bscols> bscols> fltr_s> ## Only run examples in interactive R sessions fltr_s> if (interactive()) { fltr_s+ fltr_s+ sd <- SharedData$new(chickwts) fltr_s+ filter_select("feedtype", "Feed type", sd, "feed") fltr_s+ fltr_s+ } fltr_s> ## Only run examples in interactive R sessions fltr_s> if (interactive()) { fltr_s+ fltr_s+ sd <- SharedData$new(mtcars) fltr_s+ filter_slider("mpg", "Miles per gallon", sd, "mpg") fltr_s+ fltr_s+ } scl_f_> ## Not run: scl_f_> ##D sd <- SharedData$new(iris) scl_f_> ##D renderPlot({ scl_f_> ##D df <- sd$data(withSelection = TRUE, withFilter = TRUE) scl_f_> ##D ggplot(df, aes(Sepal.Length, Sepal.Width, scl_f_> ##D color = selection_factor(df))) + scl_f_> ##D geom_point() + scl_f_> ##D scale_color_selection("#444444", "skyblue1") scl_f_> ##D }) scl_f_> ##D scl_f_> ## End(Not run) scl_f_> scl_f_> scl_f_> [ FAIL 0 | WARN 0 | SKIP 0 | PASS 22 ] > > proc.time() user system elapsed 0.92 0.20 1.12