png.report: PNG graph for reports generation

View source: R/png.report.r

png.reportR Documentation

PNG graph for reports generation

Description

Writes graph to file for inclusion in report. The function opens a graphics device, after which the plot call(s) should follow. To be executed, the graphics device needs to be closed with dev.off().

Usage

png.report(
  filename,
  w = 6,
  h = 4,
  units = "in",
  psize = 10,
  bg = "transparent",
  res = 600,
  ...
)

Arguments

filename

filename including path. To follow qP workflow standards should read the internal relative reference directory "../WorkAre/output/graphs"

w

width in units

h

height in units

units

units ('in', 'cm', or 'pt')

psize

pointsize in units

bg

background color

res

resolution of PNG graph. High values create top quality graph at the expense of large file size.

...

any additional parameters to be passed on the png()

Value

A graph written to file in .png format that can be included into reports, for example using LaTeX typesetting.

See Also

png.slide.semi, png.slide.full

Examples

## Not run:  png.report(filename = "test.png") 
set.seed(1234567)
plot(x = 1:25,y = rnorm(25,50,5))
dev.off()

qPharmetra/qpToolkit documentation built on May 24, 2023, 8:52 a.m.