Dear expeRts,
   I am now reading a book which teaching how to make  a  r package, i 
investigated from ?options but nothing said about in making a package. The help 
document only just introduce some option keys to me in some basic r packages.
  But i want to know, why need to  set some options in make a r package, e.g.
  If i use options(a=3) in my package, what's usage of a ?


The following code is from Hadley wickham's book , i attach it for your better 
understanding my quesion:


.onLoad <- function(libname, pkgname) {
op <- options()
op.devtools <- list(
devtools.path = "~/R-dev",
devtools.install.args = "",
devtools.name = "Your name goes here",
devtools.desc.author = '"First Last <first.l...@example.com> [aut, cre]"',
devtools.desc.license = "What license is it under?",
devtools.desc.suggests = NULL,
devtools.desc = list()
)
toset <- !(names(op.devtools) %in% names(op))
if(any(toset)) options(op.devtools[toset])
invisible()
}

--

PO SU
mail: desolato...@163.com 
Majored in Statistics from SJTU
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to