Learn R Programming

RnBeads (version 1.4.0)

createReportPlot: createReportPlot

Description

Initializes a report plot and opens a device to create it. The type of the device created depends on the parameters create.pdf, low.png and high.png. If create.pdf is TRUE, a PDF device is opened and its contents are later copied to PNG device(s) if needed. Otherwise, a PNG device is opened. Note that at least one of the following conditions must be met:
  • create.pdf == TRUE
  • low.png > 0
  • high.png > 0

Usage

createReportPlot(fname, report = NULL, width = 7, height = 7, create.pdf = TRUE, low.png = 100L, high.png = 0L)

Arguments

fname
character vector with one element storing the name of the output file, without the extension. The initialized object appends .pdf and/or .png to this name.
report
Report (object of type Report) to which this plot is going to be added. This is used to set the directories for PDF and/or PNG files generated for these plots. If this parameter is NULL, the current working directory is used to host all generated images.
width
numeric storing the width of the device in inches. The length of this vector must be 1.
height
numeric storing the height of the device in inches. The length of this vector must be 1.
create.pdf
Flag indicating if a PDF image is to be created. The length of this vector must be 1.
low.png
Resolution, in dots per inch, used for the figure image. Set this to 0 or a negative value to disable the creation of a low resolution image. The length of this vector must be 1.
high.png
Resolution, in dots per inch, used for a dedicated image. Set this to 0 or a negative value to disable the creation of a high resolution image. The length of this vector must be 1.

Value

Newly created ReportPlot object.

Details

In order to ensure independence of the operating system, there are strong restrictions on the name of the file. It can consist of the following symbols only: Latin letters, digits, dot (.), dash (-) and underline (_). The name must not include paths, that is, slash (/) or backslash (\) cannot be used.

See Also

pdf for manually initializing a graphics device; Report for other functions adding contents to an HTML report

Examples

Run this code

plot.image <- createReportPlot('scatterplot_tumors')
plot(x = c(0.4, 1), y = c(9, 3), type = 'p', main = NA, xlab = expression(beta), ylab = 'Measure')
off(plot.image)


Run the code above in your browser using DataLab