- ...
-
Fix minor help-page mistake.
-
LaTeX vignettes failed with
Undefined control sequence. \pdfsuppressptexinfo
with old LaTeX versions.
-
Package no longer imports
R.utils::inherits()
, which is deprecated and will eventually be removed. -
Vignette now uses
\pdfsuppressptexinfo=-1
to avoid PTEX metadata being recorded.
- All
toNNN()
functions now use the corresponding device type alias"{nnn}"
rather than the specific devicennn
, e.g.toPNG()
will attempt to produce a PNG file using the set of device types that alias"{png}"
specifies, whereas in the pasttoPNG()
used only"png"
.
-
Added support for specifying alternative device types, e.g.
"png|cairo_png"
will use the"png"
type if available, otherwise the"cairo_png"
type. If neither are available, an informative error message is produced. -
Added support for device alias types, e.g.
"{png}"
expands to"png|cairo_png|CairoPNG|png2"
.
as.architecture()
did not always return the expectedarch
.
- Package examples no longer outputs to figures/ folder in current working directory. Instead, it's outputting to a temporary folder.
-
as.architecture()
for recordedplot would produce "Error in !is.na(arch) && !is.na(arch$arch) : 'length(x) = 4 > 1' in coercion to 'logical(1)'" with environment variable_R_CHECK_LENGTH_1_LOGIC2_=true
set. -
getDevOption()
could produce "Error in is.character(type) && type != "*" : 'length(x) = 3 > 1' in coercion to 'logical(1)'" with environment variable_R_CHECK_LENGTH_1_LOGIC2_=true
set.
-
Add support for RStudio's RStudioGD device, e.g.
toRStudioGD()
anddevEval()
withtype = "RStudioGD"
. -
Added a
"null"
graphics device,nulldev()
, that voids all graphics output. It may also be opened bydevNew("nulldev")
.devEval("nulldev", <expr>)
, andtoNullDev(<expr>)
, which will evaluate the expression while at the same time drop any plot output. -
Added
suppressGraphics()
.
- Package did not install on R (< 3.0.0) because base64enc (>= 0.1-3) failed to to install on those versions. Now require only base64enc (>= 0.1-2).
-
Calling
devNew(type, ..., aspectRatio)
withtype
being a function and neitherwidth
norheight
could be inferred from the devices type generated an error when trying to generate a warning. -
TESTS: Don't test
as.architecture()
onrecordedplot
objects that require coercion between endianess, which is yet not supported.
-
Printing a plot recorded by
capturePlot()
now automatically falls back to replaying it coerced to the current machine's architecture if the default replay fails. -
Added
as.architecture()
forrecordedplot
objects to make it easy to coerce between 32-bit and 64-bit versions of a serialized recorded plot (e.g. viacapturePlot()
) so that it can be replotted everywhere.
- Added
capturePlot()
making it possible to capture low-level plot commands usinggrDevices::recordPlot()
such that the plot can be displayed / regenerated elsewhere, e.g. in a different / future R session. Requires R (>= 3.3.0).
devEval(pdf, ...)
without explicit argumentext
would give an error.
- Package test coverage is 91%.
- Package requires R (>= 2.14.0), because of
requireNamespace()
.
-
devSetLabel(which, label)
gave an error ifwhich
was a label. -
Closing devices by their labels gave an error if they where not opened in ordered.
- ROBUSTNESS: Increased package test coverage from 72% to 87%.
- Add
capabilitiesX11()
.
-
toX11()
gave error "Device type 'X11' is not known/supported". -
devOptions(grDevices::png)
returneddevOptions("favicon")
- notdevOptions("png")
as expected.
- Explicit import of utils and graphics functions.
- When calling
devEval()
on multiple devices then underlying graphics device functions no longer gives an error of unknown arguments, which means it is now possible to pass device specific arguments also when in multi-device calls, e.g.devEval(c("x11", "png"), res = 100, { plot(1:10) })
.
-
devNew("quartz", which = "foo")
could set the label of device #1(!) when quartz devices was not supported. This was becausequartz()
only gives a warning (and not an error) when it is not supported, so the internal code thought the devices was successfully opened. -
Renaming incomplete files gave an error if there were already files renamed for similar reasons. Added package test.
-
devEval(type, ...)
gave 'Error in strsplit (type, split = "|", fixed = TRUE' if type was a device function. Added package tests showing that it's possible to dodevEval(type = grDevices::png, ext = "png", plot(1:10))
in addition todevEval(type = "png", ext = "png", plot(1:10))
.
- TESTS: Package coverage 74% (was 64%).
- Cleanup: Using
requireNamespace()
instead ofrequire()
internally.
-
DEVICES: Added support for all
Cairo*
devices of the Cairo package. -
DEVICES: Added
favicon()
device, which is a wrapper forpng()
with bells and whistles. It has its own device options. UpdatedtoFavicon()
to use default argumentfield = "htmlscript"
, which generates an HTML script that dynamically sets the favicon. -
Several functions now supports specifying device type names by regular expressions, e.g.
devOptions("cairo_.*")
anddevEval("cairo_.*", name = "foo", { plot(1:10) })
. The latter will output one image file for each availablecairo_.*
device. -
Added support for "global" device options to fall back on if no set for the device type queried, e.g.
devOptions("*", pointsize = 14)
. -
Now arguments
sep
,path
,field
andforce
fordevEval()
and the varioustoNNN()
functions now utilizesgetDevOption()
, which is still backward compatibility with the old style R options. -
Now
devIsInteractive()
without arguments returns all known interactive devices. -
ROBUSTNESS: Now package does a better job of checking whether a particular device is supported on the current system, cf.
capabilities()
andCairo::Cairo.capabilities()
.
-
Cleanup: Dropped argument
field
fortoNNN()
, because the default is now NULL which corresponds to returning aDevEvalProduct
object. In turn, this object has the pathname as it's value, which was the previous defaultfield
value. Also,as.character()
on this object returns the (relative) pathname. -
Cleanup: All old-style R options (e.g.
devEval/args/field
) have been deprecated. They will still work for a while but it is recommended to set them asdevOptions("*", field = ...)
instead.
- Added
view()
and!()
toDevEvalProduct
.
-
devDone()
would close some devices despite them being on screen/interactive devices, e.g. an x11 device. -
devNew(x11)
on Unix/Linux where the defaultwidth
orheight
failed to be inferred would throw an error reporting on "cannot coerce type 'closure' to vector of type 'character'".
- ROBUSTNESS: Now
withPar()
also resets all the graphical parameters available upon entry even if no explicit ones were specified. This covers the case whenexpr
changes the parameters, e.g.withPar({ par(cex = 2L); plot(1:10) })
.
-
Now
getPathname(..., relative = FALSE)
returns the absolute pathname. -
devOptions()
returned the incorrect options for device types"eps"
,"jpg2"
, and"png2"
, if package was not attached.
- Added
getDevOption()
.
-
On Windows,
devOptions()
assumed that the grDevices package was attached. -
devOptions(type, name = NULL)
did not assign the option NULL. -
devDump()
fell back on optiondevDump/args/path
, but that would never happen. Dropping that option.
* devEval("cairo_pdf", ...)
for generate an image file with a
*.cairo_pdf filename extension. Now devEval(..., ext = NULL)
does a better job of inferring the default extension from the
device type.
- ROBUSTNESS: Added explicit package tests for
devOptions()
.
- Added
getData()
toDevEvalFileProduct
.
- Added support for
devEval()
to try multiple device types one-by-one until success, e.g.devEval("png|jpg|bmp", ...)
.
- Changed default argument
field
fortoNNN()
from"fullname"
to"pathname"
as ingetOption("devEval/args/field", "pathname")
. This should work for most compilers including LaTeX, although for the latter it is preferred to use"fullname"
. See the package vignette for details.
- Update package vignette with information on how to output image files of multiple formats in one call.
-
Cleanup: Removed false
R CMD check
NOTE. -
Bumped up the package dependencies.
- Bumped up the package dependencies.
- Added
withPar()
for plotting with temporarily set graphical parameters.
-
Added
toDefault()
for plotting to the default device analogously to how the othertoNNN()
device functions works. Likewise, addedtoX11()
,toWindows()
,toQuartz()
,toCairoWin()
,toCairoX11()
, andtoJavaGD()
for plotting to interactive/screen devices. -
Now it's possible to use
devEval()
to open a new or activate an existing interactive/screen device. -
Added support for (hidden) argument
which
todevNew()
, such thatdevNew(type, which = which)
avoids opening a new device iff an existing device of the same device type and index/label already is opened. For instance, callingdevNew("X11", which = "foo")
will open an X11 device and label itfoo
. Subsequent calls will set the focus that same device.
- Now
devEval("windows", { plot(1:10) })
no longer gives "Error: Detected new graphics devices that was opened but not closed while executing devEval(): '2' (windows)".
- Bumped up package dependencies.
- Added
asDataURI()
for converting an image file to an Base64-encoded data URI character string.
- Added
toFavicon()
for outputting figures as HTML favicons.
- Now the timestamp of the default path for
devDump()
is in the local one.
devOptions(types)
would drop all options for combinations of device types that have identical sets of options, e.g.types = c("png", "png")
ortypes = c("bmp", "png")
.
-
Bumped up package dependencies.
-
No longer need for an ad hoc NAMESPACE import.
-
Added
devDump()
which is short for callingdevEval(c("png", "pdf"), ..., which = devList(interactiveOnly = TRUE))
, i.e. it copies the content of open interactive ("screen") devices. -
Added argument
interactiveOnly
todevList()
. -
If
expr
is missing,devEval()
copies the current active device anddevEval(which = devList())
copies all open devices. For example,plot(1:10); devEval(c("png", "jpg", "pdf"), name = "myfig")
.
-
devSet(which)
wherewhich
is a very large number could leave lots of stray temporary devices open when error "too many open devices" occurred. Now all temporary devices are guaranteed to be closed also when there is an error. -
devIsOpen()
,dev(Get|Set)Label(which)
would not handle the case when the device was specified by an numericwhich
and there is a gap in the device list.
- Now package imports (no longer suggests) the base64enc package. This way packages using R.devices do not have to specify also base64enc if they use dataURI-encoding of images.
- ROBUSTNESS: Now
devSet()
guarantees to close all temporary devices it opens.
- ROBUSTNESS: Added package system tests for
devSet()
.
- Now the package vignettes are in vignettes/ - and not in inst/doc/ which will not be supported by R (>= 3.1.0).
-
Cleanup: Now explicitly importing only what is needed in NAMESPACE.
-
Bumped up package dependencies.
-
GENERALIZATION: Vectorized
devEval()
, e.g. it is now possible to dodevEval(c("png", "pdf"), name = "MyPlot", { plot(1:10) })
. Added argumentsinitially
andfinally
todevEval()
. Contrary toexpr
which is evaluated for each graphics type/device, these are evaluated only once per call. This makes it possible to avoid repeating expensive computations. -
GENERALIZATION: Vectorized
devIsInteractive()
,devIsOpen()
,devGetLabel()
,devOff()
, anddevDone()
. -
Now
devOff()
anddevDone()
checks if device is opened before trying to close it. This avoids opening and closing of non-opened devices. -
Updated the formal defaults of several
devEval()
arguments to be NULL. Instead, NULL for such arguments are translated to default internally. This was necessary in order to vectorizedevEval()
. -
CONSISTENCY: Now
devList()
returns an empty integer vector (instead of NULL) if no open devices exists. -
ROBUSTNESS: The device functions that are not vectorize do now throw an informative error if passed a vector.
-
Now the
R.devices
Package
object is also available when the package is only loaded (but not attached).
- ROBUSTNESS: Added several more package system tests.
-
ROBUSTNESS: Now declaring all S3 method in NAMESPACE.
-
Cleanup: Removed fall back attachments of R.utils as these are no longer needed with R.oo (>= 1.15.1).
- ROBUSTNESS: Now
getDataURI()
throws anException
is suggested package base64enc is not installed.
-
Some package examples and system tests assumed that the suggested package base64enc is installed.
-
Package vignette assumed that R.rsp and R.utils are attached.
- Bumped up package dependencies.
-
Added support for retrieving a Base64-encoded data URI string from a
DevEvalFile
. -
Added classes
DevEvalProduct
andDevEvalFileProduct
, which are returned bydevEval()
.
- TESTS: Added package system tests.
- Added
devIsInteractive()
.
- Now
devEval()
no longer passes a pathname todevEval()
for interactive devices, which in turn would generate warnings.
- Package no longer utilizes
:::
.
- Argument
ext
ofdevEval()
can now be inferred from argumenttype
also whentype
is passed via a string variable.
-
Added support the
win.metafile
(WMF) device type and addedtoWMF()
creating (extended) WMF files. Since the file format is extended WMF, which often has file extension *.emf,toEMF()
was also added.toEMF()
uses the same device driver astoWMF()
with the only difference that the file extension is *.emf instead of *.wmf. -
Now
devOptions()
can query the options of multiple device types. Added argumentsoptions
anddrop
todevOptions()
. -
Now
devEval()
returns a list of classDevEvalFile
.
- Hiding internal/legacy functions from the help index.
- Added argument
sep
todevEval()
together with an option to set its default value.
- Updated how vignettes are built and included.
-
Now
devNew()
returns the index of the opened device. -
Now
devEval()
anddevNew()
, and hencetoPNG()
and so on, can be called without attaching the package, e.g.R.devices::toPNG()
.
-
Cleanup: Now package only imports the R.utils. However, it will attach ("load") R.utils as soon as
devEval()
ordevNew()
is called. -
Bumped up package dependencies.
- Now the package vignette is built via the R (>= 3.0.0) vignette engines, if available.
- Now all Rd
\usage{}
lines are at most 90 characters long.
- ROBUSTNESS: Now
devEval()
does a better job of making sure to close the same device as it opened. Previously it would close the current active device, which would not be the correct one if for instance other devices had been open in the meanwhile/in parallel.
- Now package builds with both R.rsp (< 0.9.1) and R.rsp (>= 0.9.1).
-
Bumped up package dependencies.
-
Cleaned up the NAMESPACE file.
- Preparing package vignettes for the upcoming R 3.0.0 support for non-Sweave vignettes.
- Bumped up package dependencies.
-
Changed default argument
field
fordevEval()
from NULL togetOption("devEval/args/field", NULL)
. -
Changed default argument
field
fortoNNN()
from"fullname"
togetOption("devEval/args/field", "fullname")
.
- Specifying new DESCRIPTION field
VignetteBuilder
.
- Utilizing new
startupMessage()
of R.oo.
- Minor corrections and clarifications in the vignette.
-
CONSISTENCY: Now using
throw()
instead ofstop()
everywhere. -
Only importing what is necessary from R.methodsS3 and R.oo.
-
Made all integer constants truly integers.
-
Fixed minor typo in the vignette.
-
In
help(devEval)
the link tohelp(devNew)
was broken.
- Updated versions of the package dependencies.
- Now
devOptions()
returns options invisibly if some options were set, otherwise not, e.g.devOptions()
versusdevOptions("png", width = 1024)
.
- Added a first draft of a package vignette.
- Merged updates from the R.utils v1.13.1.
-
Created package by extracting all methods in R.utils v1.9.1 that are related to graphical devices.
-
The below change log shows the changes to the device methods while they were in R.utils. For this reason, we choose to set the version of this package such that it starts where we left R.utils.
-
Added
devOptions()
. -
Added default
width
andheight
values toeps()
. -
Turned
png2()
andjpeg2()
into plain functions without a generic. This is consistent with howeps()
is defined. -
Now the default
width
is inferred fromdevOptions()
if needed.
- Added an example to
help(devEval)
.
- Added argument
field
todevEval()
.
devNew()
no longer gives a warning about argumentaspectRatio
is specified when both or neither ofwidth
andheight
are given, andaspectRatio == 1
.
- Now
devEval("jpg", ...)
is recognized asdevEval("jpeg", ...)
.
- Now argument
force
ofdevEval()
defaults togetOption("devEval/args/force", TRUE)
.
-
Now argument
path
ofdevEval()
defaults togetOption("devEval/args/path", "figures/")
. -
Now
devEval()
does a better job of "cleaning up"name
andtags
.
-
devNew()
gained optiondevNew/args/par
, which can be used to specify the default graphical parameters fordevNew()
. Any additional parameters passed via argumentpar
will override such default ones, if both specifies the same parameter. -
The automatic archiving of
devEval()
is not considered unless the R.archive package is loaded, regardless of option settings.
- The title of
help(devDone)
was incorrect.
-
Now argument
aspectRatio
ofdevNew()
defaults to 1 (not NULL). -
REPRODUCIBLE RESEARCH: Now
devEval()
archives any generated image files if R.archive optiondevEval
is TRUE.
-
Added argument
par
todevNew()
for applying graphical parameters at the same time as the device is opened, which is especially useful when usingdevEval()
. -
Changed argument
force
ofdevEval()
to default to TRUE.
-
Added trial version of
devEval()
for simple creation of images. -
Added argument
aspectRatio
todevNew()
, which updates/sets theheight
or thewidth
, if the one of the other is not given.
- Now argument
which
todevSet()
can be any object. If not a single numeric or a single character string, then a checksum character string is generated usingdigest::digest(which)
.
- Now
devDone(which = 1)
does nothing. Before it gave an error.
- Argument
type
ofdevNew()
did not takefunction
:s.
- Now
devNew()
filters out argumentsfile
andfilename
if the device is interactive.
- Added several functions for extending the current functions dealing
with devices. All added functions can address a device by a label
in addition to the standard device index. The
devGetLabel()
anddevSetLabel()
gets and sets the label of a give device.devList()
lists the indices of existing device named by their labels, cf.dev.list()
. The functionsdevSet()
anddevOff()
work likedev.set()
anddev.off()
but accept labels as well. Furthermore,devSet(idx)
will open a device with indexidx
if it does not exists, anddevSet(label)
a device with that label if not already opened. ThedevIsOpen()
checks if a device is open or not. ThedevDone()
function callsdevOff()
except for screen devices.
- The default filename for
eps()
had extension *.ps not *.eps.
- Since the
png2()
andjpeg2()
devices are in this package, theeps()
device from R.graphics has been moved here for consistency.
- Added trial versions of
jpeg2()
andpng2()
.