createReportPlot {RnBeads} | R Documentation

## 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`.

### 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.

### Value

Newly created `ReportPlot` object.

### Author(s)

Yassen Assenov

### See Also

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

### Examples

    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)

[Package RnBeads version 2.12.2 Index]