1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2026-04-27 08:11:37 +02:00

Nvim: R now instantly and automatically displays plots.

This commit is contained in:
2026-04-25 10:47:49 +02:00
parent 987a39c4b8
commit 5e54bed174
3 changed files with 13 additions and 2 deletions

11
.Rprofile Normal file
View File

@@ -0,0 +1,11 @@
if (!interactive()) {
options(device = function(...) pdf("Rplot.pdf"))
.Last <- function() {
if (dev.cur() > 1) {
dev.off()
system("xdg-open Rplot.pdf", wait = FALSE)
Sys.sleep(2)
}
}
}