Open mmp3 opened 3 years ago
Hi @mmp3!
To save a plot as a PDF you can do the following (to save the global balance for example)
1) Run the code 2) Run the following comands:
# Modify the properties of your plot in order to visualize it properly (width, height, . . .) and open a PDF document
pdf("MyPlot.pdf")
# Represent the plot
grid.draw(CV.BAL.dic$global.plot)
# Close and save theh plot
dev.off()
At the end, you will get the PDF document with the representation at the directory you are working at.
Hi @UVic-omics Thank you for the suggestion.
The problem is not with individual plots (global.plot
, accuracy.nvar
, etc.). I save those to files afterwards as you indicated.
Instead, the problem is with the initial call to selbal.cv
itself. It should not be plotting anything, but it apparently does. It prints a blank page.
Hi @mmp3, I executed the R script file foo.R and no blank page pdf was created
Consider an R script file
foo.R
that callsselbal.cv
.For example, we follow the
selbal
vignette:foo.R
:And then we execute this in an R console:
The command completes successfully, but it creates a file
Rplots.pdf
in the working directory. This file is a blank page.However, if I execute
selbal.cv
interactively, i.e. I physically type in or copy-and-paste theselbal.cv
command into the console, then it does not create a file calledRplots.pdf
:(does not create a file named
Rplots.pdf
)