From 4a34a7a08c53e4c068566fa343c54b74bddaf078 Mon Sep 17 00:00:00 2001 From: pvictor Date: Fri, 9 Apr 2021 15:02:16 +0200 Subject: [PATCH] added warning if RStudio < 1.2 --- R/esquisser.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/esquisser.R b/R/esquisser.R index ee3e0a94..bf781c57 100644 --- a/R/esquisser.R +++ b/R/esquisser.R @@ -46,6 +46,11 @@ esquisser <- function(data = NULL, controls = c("labs", "parameters", "appearance", "filters", "code"), viewer = getOption(x = "esquisse.viewer", default = "dialog")) { viewer <- match.arg(viewer, choices = c("dialog", "pane", "browser")) + + rs_version <- try(rstudioapi::versionInfo()$version, silent = TRUE) + if (!inherits(rs_version, "try-error") && rs_version < "1.2") { + warning("Esquisse may not work properly, try updating RStudio.", call. = FALSE) + } res_data <- get_data(data, name = deparse(substitute(data))) if (!is.null(res_data$esquisse_data)) {