Skip to content

Commit d20bda8

Browse files
committed
rstudio version helper
1 parent 9e96286 commit d20bda8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

R/utils.R

+8
Original file line numberDiff line numberDiff line change
@@ -1025,3 +1025,11 @@ try_library <- function(pkg, fun = NULL) {
10251025
is_rstudio <- function() {
10261026
requireNamespace('rstudioapi', quietly = TRUE) && rstudioapi::isAvailable()
10271027
}
1028+
1029+
1030+
# TODO: warn Windows users to use 1.2.x in some scenarios?
1031+
# https://github.com/ropensci/plotly/issues/1211
1032+
rstudio_version <- function() {
1033+
if (!is_rstudio()) return(NA)
1034+
rstudioapi::versionInfo()$version
1035+
}

0 commit comments

Comments
 (0)