commit | 5b71b2da622bcce64133d83b8c126201d5d86de0 | [log] [tgz] |
---|---|---|
author | Hao Zhu <haozhu233@gmail.com> | Mon Mar 26 16:31:09 2018 -0400 |
committer | Hao Zhu <haozhu233@gmail.com> | Mon Mar 26 16:31:09 2018 -0400 |
tree | 6f60fc412a86729db1925f0b6118842a3b69ba89 | |
parent | 27c7c85c3e8675244107210198b02c075280ad1f [diff] [blame] |
adding some checks to disable the real-time display when RStudio is not running
diff --git a/R/print.R b/R/print.R index eb006de..13e8568 100644 --- a/R/print.R +++ b/R/print.R
@@ -7,8 +7,9 @@ ) html_table <- htmltools::HTML(as.character(x)) html_result <- htmltools::tagList(html_header, html_table) - htmltools::html_print(html_result) - + if (interactive & rstudioapi::isAvailable()) { + htmltools::html_print(html_result, viewer = rstudioapi::viewer) + } print(html_result) }