Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get rid of ani.options('outdir') #31

Closed
yihui opened this issue Jun 19, 2013 · 0 comments
Closed

get rid of ani.options('outdir') #31

yihui opened this issue Jun 19, 2013 · 0 comments
Milestone

Comments

@yihui
Copy link
Owner

yihui commented Jun 19, 2013

the option outdir is confusing, and users often do not know where the animations were created since it defaults to tempdir(); a better and common practice is to do everything in the current working directory

below is a list of affected functions:

$ grep outdir -r .
./inst/examples/ani.options-ex.R:## change outdir to the current working directory
./inst/examples/ani.options-ex.R:ani.options(outdir = getwd())
./inst/examples/saveHTML-ex.R:## use the function brownian.motion() in this package; note this page is created in 'index.html' under ani.options('outdir')
./inst/misc/Sweave_animation.Rnw:ani.options(outdir = getwd())
./inst/misc/Rweb/demo.html:ani.options(outdir = "/tmp")
./inst/misc/Rweb/Rweb.R:    imgdir = file.path(ani.options('outdir'), ani.options('imgdir'))
./NEWS:  ani.options('outdir') (similar to saveGIF())
./NEWS:    o fixed a buglet in saveMovie(): outdir does not actually work.
./NEWS:    o fixed a bug caused by the 'outdir' option in ani.options() when
./NEWS:  'outdir' is a relative path which makes ani.stop() fail (thanks,
./man/ani.options.Rd:  \item{outdir}{character: specify the output directory
./man/ani.options.Rd:  current working directory by \code{ani.options(outdir =
./man/ani.options.Rd:## change outdir to the current working directory
./man/ani.options.Rd:ani.options(outdir = getwd())
./man/saveHTML.Rd:## created in 'index.html' under ani.options('outdir')
./man/g.brownian.motion.Rd:g.brownian.motion(p = 20, start = 1900, digits = 14, file = file.path(ani.options("outdir"), 
./man/g.brownian.motion.Rd:unlink(file.path(ani.options("outdir"), ani.options("htmlfile")))
./man/saveLatex.Rd:  \code{ani.options('outdir')}? If you have not installed
./R/zzz.R:    outdir = tempdir(), imgdir = "images", htmlfile = "index.html",
./R/ani.start.R:    ani.options(outdir = c(ani.options("outdir"), setwd(ani.options("outdir"))))
./R/saveGIF.R:  outpath_final=file.path(ani.options('outdir'),movie.name)
./R/saveHTML.R:  imgdir = file.path(ani.options('outdir'), ani.options('imgdir'))
./R/saveHTML.R:  htmlfile = file.path(ani.options('outdir'), ani.options('htmlfile'))
./R/saveHTML.R:    message('You may use ani.options(outdir = getwd()) or saveHTML(..., outdir = getwd()) to generate files under the current working directory.')
./R/im.convert.R:    output.path = file.path(ani.options('outdir'), output)
./R/saveSWF.R:  outdir = ani.options('outdir')
./R/saveSWF.R:  owd = setwd(outdir)
./R/saveSWF.R:            output.path <- normalizePath(file.path(outdir, swf.name)))
./R/saveLatex.R:#'   \file{animfp.sty} to \code{ani.options('outdir')}? If you have not
./R/saveLatex.R:  outdir = ani.options('outdir')
./R/saveLatex.R:          ani.options(img.fmt = file.path(outdir, paste(img.name, '%d.',
./R/saveLatex.R:          ## outdir = '.'
./R/saveLatex.R:  owd = setwd(outdir)
./R/saveLatex.R:  img.fmt = file.path(outdir, sprintf("%s%s.%s", img.name, num, file.ext))
./R/saveLatex.R:                ifelse(full.path, gsub('\\\\', '/', normalizePath(file.path(outdir, img.name))), img.name),
./R/saveLatex.R:                ifelse(full.path, gsub('\\\\', '/', normalizePath(file.path(outdir, img.name))), img.name),
./R/ani.options.R:#' \item{outdir}{character: specify the output directory when we
./R/ani.options.R:#' working directory by \code{ani.options(outdir = getwd())}.}
./R/saveVideo.R:  outdir = ani.options('outdir')
./R/saveVideo.R:  owd = setwd(outdir)
./R/saveVideo.R:            output.path <- normalizePath(file.path(outdir, video.name)))
./R/g.brownian.motion.R:#' unlink(file.path(ani.options('outdir'), ani.options('htmlfile')))
./R/g.brownian.motion.R:    digits = 14, file = file.path(ani.options('outdir'),
./R/ani.stop.R:    setwd(ani.options("outdir")[2])
./R/ani.stop.R:    ani.options(outdir = ani.options("outdir")[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant