When using pairs() I like using the suggested functions panel.cor and panel.hist (which are suggested in the examples) to eliminate the duplicated upper or lower triangular space and provide extra information.
I would like to source those functions using something like
source(example(pairs, ask = F, echo = F))
and not get any output (including: Error in readLines(file, warn = FALSE) : 'con' is not a connection), and not have the example plots print. Is this possible?
As I side note, the reason I’d like the plots not to print is that I want to use this in an R Markdown file and not have to look at the example(pairs) plots in my document.
You could run a chunk that is not included, and does not keep the figures. The functions will be available as the code is run, but the output not included in the document.
The output looks like
exists("panel.cor")panel.corexists in the global environment — you can use it.EDIT alternative
You could also use the
give.linesargument and save the source code yourself