Is it possible to get current RStudio Viewer pane dimensions programmatically?
This article describes how to set them (height only):
https://support.rstudio.com/hc/en-us/articles/202133558-Extending-RStudio-with-the-Viewer-Pane
grDevices::dev.size("px")
returns the width/height of the current graphics device in pixels (and will open the default device if none is already open). Since RStudio's graphics device size is tied to the viewer's size, this function also returns the size of the (non-zoomed) viewer pane.
This currently isn't possible, the RStudio API doesn't seem to expose those parameters at the moment. That's what I imply from the reply by RStudio staff here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With