blankPNG: create white background empty PNG

Description Usage Arguments Value Author(s) Examples

View source: R/blanks.R

Description

Sometimes you need a placeholder. If you do, this is it!

Usage

1
2
3
4
5
6
7
8
blankPNG(
  file,
  height = 250,
  width = 250,
  messg = "Your Logo Could Be Here",
  pointsize = 12,
  col = "gray50"
)

Arguments

file

A file name for output

height

pixels

width

pixels

messg

Default is a reminder statement inside the resulting image, but set "" if you don't want it.

pointsize

pointsize 12 default

col

Color for text in messg parameter. Default is gray50

Value

NULL is returned if file was created. Otherwise error is reported.

Author(s)

Paul Johnson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
tdir <- tempdir()
dir.create(file.path(tdir, "blanks"), recursive = TRUE)
fn1 <- file.path(tdir, "blanks", "blank1.png")
blankPNG(file = fn1, messg = "Do you want a message?")
## Please inspect
if(interactive()) browseURL(fn1)
fn2 <- file.path(tdir, "blanks", "blank2.png")
blankPNG(file = fn2, height = 2, width = 3, messg = "")
if(interactive()) browseURL(fn2)
## delete test directory
unlink(file.path(tdir, "blanks"), recursive = TRUE)

stationery documentation built on April 28, 2020, 5:13 p.m.