Description Usage Arguments Details Value Author(s) See Also Examples
snap
is designed as a more convenient interface to rgl.snapshot
,
allowing one to set a base filename for graphic output files, an initial
sequence number, and then just use
snap()
to capture the current screen image to a sequentially numbered output file.
1 |
suffix |
Character string appended to |
fn |
Base file name, typically set by assigning a character string to |
n |
Initial suffix number used to construct the file name,
typically set by assigning a character string to |
inc |
Should the function increment the sequential number in the global environment? |
fmt |
Output graphic file format. Default: |
Output files are written to the current directory. Use setwd
to put them where
you want.
Returns invisibly the name of the snapshot file
Georges Monette
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
.snap.fn <- 'Lecture1'
.snap.n <- '001'
# ... generate an rgl graph ...
snap()
# ... will invoke rgl.snapshot which filename 'Lecture1001.png' and increment
# .snap.n to '002' in the .GlobalEnv
# ... generate an rgl graph ...
snap()
# ... will invoke rgl.snapshot which filename 'Lecture1002.png' and increment
# .snap.n to '003' in the .GlobalEnv
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.