> My R code blocks work fine in org 9.5. When I plot graph using base graphics > in session, it works fine. The problem is with lattice graphs. With below > header variables, code block works fine. > > #+begin_src R :session *R* :results graphics file :file test.png > library(lattice) > print(histogram(rnorm(10000))) > #+end_src > > But this does not work. Emacs hangs. > > #+begin_src R :session *R* :results output graphics file :file test.png > library(lattice) > histogram(rnorm(10000)) > #+end_src
In my hands, all combinations work with/without the `output` and with/without the `print`. IMO, you should not want to include the print. Here is my environment: Org mode version 9.5.2 (release_9.5.2-9-g7ba24c) GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.15.12, Xaw3d scroll bars) of 2022-01-19 ESS version 18.10.3snapshot R sessionInfo() R version 4.2.0 (2022-04-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core) Matrix products: default BLAS: /n/apps/CentOS7/install/r-4.2.0/lib64/R/lib/libRblas.so LAPACK: /n/apps/CentOS7/install/r-4.2.0/lib64/R/lib/libRlapack.so locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] lattice_0.20-45 loaded via a namespace (and not attached): [1] compiler_4.2.0 grid_4.2.0