R/snap.R

Defines functions snap

Documented in snap

##
## p3d:snap.R
## 2011-12-22
##


snap <-
function( suffix = "", fn = .snap.fn, n = .snap.n, inc = TRUE, fmt = "png") {
         help <- "
         
         > .snap.fn <- 'Lecture1'
         > .snap.n <- '001'
         > snap()
         
         will invoke rgl.snapshot which filename 'Lecture1001.png' and increment
         .snap.n to '002' in the .GlobalEnv
         "
         
         filename <- paste( fn, n, suffix, ".", fmt , sep = "")
         rgl.snapshot( filename, fmt = fmt)
         if (inc) assign( ".snap.n", Inc(.snap.n), envir = .GlobalEnv)
         invisible( filename )
    }

Try the p3d package in your browser

Any scripts or data that you put into this service are public.

p3d documentation built on May 2, 2019, 5:25 p.m.