compose_close | R Documentation |
Function compose_close
does followed tasks: 1) completes all unfinsished actions before shutting down graphical device, 2) cuts extra margins, and 3) opens resulted PNG file in the associated viewer.
compose_close(...)
## non-public
.compose_close(kind = c("crop2", "crop", "nocrop"),
border = 5, bpp = 0, execute = TRUE, verbose = FALSE)
... |
Set of arguments, which are recognized via their names and classes, and then passed to
| ||||||||||||
kind |
Character keyword for cutting of excess white spaces. If | ||||||||||||
border |
Non-negative integer. Number of pixels for margins, which are not cropped. Default is | ||||||||||||
bpp |
Integer. Bits per pixel for output PNG file. Valid values are | ||||||||||||
execute |
Logical. Should created PNG file be opened in the associated external program for viewing graphical files? Default is | ||||||||||||
verbose |
Logical. Value |
The cut manipulations (crop="crop"
or crop="crop2"
) are implemented using readPNG
and writePNG
functions of package png. These fuctions have limitations in the memory allocation.
Function compose_close
clears all internal graphical options, specified during compose_open
executing.
Some parameters are specified in compose_open
: weather output PNG file will be removed after opening (logical delafter
), or what is the time of waiting for file opening and next removing (numerical wait
in seconds).
Function returns NULL
value.
Currenty, execute=TRUE
is implemented for Windows platform only using construction R CMD open \emph{fileout}
.
Nikita Platonov platonov@sevin.ru
session_grid(NULL)
a <- ursa_dummy(nband=6,min=0,max=255,mul=1/4)
## exam 1
compose_open()
compose_close()
## exam 2
compose_open(a)
compose_close()
## exam 3
compose_open("rgb",fileout="tmp1")
compose_plot(a[1:3])
compose_close(execute=FALSE)
Sys.sleep(1)
a <- dir(pattern="tmp1.png")
print(a)
file.remove(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.