## copied from ggobi/cranvas 10/26/12
## thanks to Yihui Xie with contributions from Tengfei Yin
## additional changes by Marie Vendettuoli
#!/usr/bin/env Rscript
## this script will automatically run roxygen on chromatoplotsgui; it can be used as a shell script
## e.g. 'Rscript roxygenize.R' or 'Rscript roxyenize.R update' to run 'git pull' before roxygenizing
## run roxygen and check the package: Rscript roxygenize.R check
## extract the working directory from the file you provided
## e.g. Rscript ~/pkg/cranvas/roxygenizeCPG.R
p = grep("--file=", commandArgs(), fixed = TRUE, value = TRUE)
if (length(p) == 1) {
p = dirname(sub("^--file=", "", p))
setwd(p)
}
## make sure the working directory is under chromatoplotsgui
if (!("chromatoplotsgui" %in% list.files("../"))) stop("the chromatoplotsgui package not found under ",
normalizePath(file.path(getwd(), "..")))
## update git as well; someone wants to be really lazy
if ("update" %in% commandArgs(TRUE)) system("git pull --rebase")
try(update.packages(.libPaths()[1], ask = FALSE, repos = 'http://cran.r-project.org'))
## use Rd2roxygen to roxygenize cranvas
## go up a level
owd = setwd("..")
library(Rd2roxygen)
library(digest)
options(width = 80, replace.assign = TRUE)
## run roxygen and several cleaning up steps
unlink('chromatoplotsgui/man', recursive = TRUE)
try(rab("chromatoplotsgui", build = TRUE, install = FALSE, check = "check" %in% commandArgs(TRUE)))
setwd(owd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.