File: generate-exdata.R

package info (click to toggle)
r-cran-r.devices 2.17.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 548 kB
  • sloc: makefile: 15; sh: 13; ansic: 8
file content (12 lines) | stat: -rw-r--r-- 378 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
library(R.devices)

args <- commandArgs(trailingOnly = TRUE)
engine <- args[1]

g <- capturePlot({plot(1:10)})
system <- attr(g, "system")
tags <- sprintf("%s=%s", names(system), system)
pathname <- sprintf("inst/exdata/capturePlot,engine=%s,%s.rds",
                    engine, paste(tags, collapse=","))
cat(sprintf("generating %s ...\n", pathname))
saveRDS(g, file=pathname)