R/message_handlers.R

message_handlers <- list(
  `get-selected` = function(msg) {
    if (length(msg$data$cases) == 0) return(numeric(0))
    msg$data$cases + 1
  },
  `get-assigned` = function(msg) {
    if (length(msg$data$cases) == 0) return(numeric(0))
    msg$data$cases + 1
  },
  `get-plot-ids` = function(msg) {
    ids <- msg$data$ids
    unname(sapply(ids, increment_suffix))
  },
  `get-scale` = function(msg) {
    msg$data$scale
  }
)

Try the plotscaper package in your browser

Any scripts or data that you put into this service are public.

plotscaper documentation built on Oct. 18, 2024, 5:13 p.m.