Hi ,
This maybe a bug. I checked my another package, the same problem occurred.
See below for detailed information.
##check log##
* using log directory 'D:/StatSoft/R/MyPackage/sbar.Rcheck'
* using R version 2.10.1 (2009-12-14)
* using session charset: ISO8859-1
* checking for file 'sbar/DESCRIPTION' ... OK
* this is package 'sbar' version '0.0-1'
* checking package name space information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking for executable files ... OK
* checking whether package 'sbar' can be installed ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the name space can be loaded with stated dependencies ...
OK
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking examples ... ERROR
Running examples in 'sbar-Ex.R' failed.
###sbar-Ex.R###
### * <HEADER>
###
attach(NULL, name = "CheckExEnv")
assign("nameEx",
local({
s <- "__{must remake R-ex/*.R}__"
function(new) {
if(!missing(new)) s <<- new else s
}
}),
pos = "CheckExEnv")
## Add some hooks to label plot pages for base and grid graphics
assign("base_plot_hook",
function() {
pp <-
par(c("mfg","mfcol","oma","mar"))
if(all(pp$mfg[1:2] == c(1, pp$mfcol[2]))) {
outer <- (oma4 <- pp$oma[4]) > 0; mar4 <- pp$mar[4]
mtext(sprintf("help(\"%s\")", nameEx()), side
= 4,
line = if(outer)max(1, oma4 - 1) else min(1, mar4 - 1),
outer = outer, adj = 1, cex = .8, col = "orchid",
las=3)
}
},
pos = "CheckExEnv")
assign("grid_plot_hook",
function() {
grid::pushViewport(grid::viewport(width=grid::unit(1,
"npc") -
grid::unit(1, "lines"), x=0,
just="left"))
grid::grid.text(sprintf("help(\"%s\")",
nameEx()),
x=grid::unit(1, "npc") + grid::unit(0.5,
"lines"),
y=grid::unit(0.8, "npc"), rot=90,
gp=grid::gpar(col="orchid"))
},
pos = "CheckExEnv")
setHook("plot.new", get("base_plot_hook", pos =
"CheckExEnv"))
setHook("persp", get("base_plot_hook", pos =
"CheckExEnv"))
setHook("grid.newpage", get("grid_plot_hook", pos =
"CheckExEnv"))
assign("cleanEx",
function(env = .GlobalEnv) {
rm(list = ls(envir = env, all.names = TRUE), envir = env)
RNGkind("default", "default")
set.seed(1)
options(warn = 1)
.CheckExEnv <- as.environment("CheckExEnv")
delayedAssign("T", stop("T used instead of TRUE"),
assign.env = .CheckExEnv)
delayedAssign("F", stop("F used instead of FALSE"),
assign.env = .CheckExEnv)
sch <- search()
newitems <- sch[! sch %in% .oldSearch]
for(item in rev(newitems)) detach(item, character.only=TRUE)
missitems <- .oldSearch[! .oldSearch %in% sch]
if(length(missitems))
warning("items ", paste(missitems, collapse=", "),
" have been removed from the search path")
},
pos = "CheckExEnv")
assign("ptime", proc.time(), pos = "CheckExEnv")
## at least one package changes these via ps.options(), so do this
## before loading the package.
## Use postscript as incomplete files may be viewable, unlike PDF.
## Choose a size that is close to on-screen devices, fix paper
grDevices::ps.options(width = 7, height = 7, paper = "a4", reset =
TRUE)
grDevices::postscript(paste(pkgname, "-Ex.ps", sep=""))
assign("par.postscript", graphics::par(no.readonly = TRUE), pos
"CheckExEnv")
options(contrasts = c(unordered = "contr.treatment", ordered
"contr.poly"))
options(pager = "console")
library('sbar')
assign(".oldSearch", search(), pos = 'CheckExEnv')
assign(".oldNS", loadedNamespaces(), pos = 'CheckExEnv')
cleanEx(); nameEx("stKDE.simcomp")
### * stKDE.simcomp
flush(stderr()); flush(stdout())
### Name: stKDE.simcomp
### Here, just copied my example codes, so i ignored here to save space.
### * <FOOTER>
###
cat("Time elapsed: ", proc.time() - get("ptime", pos =
'CheckExEnv'),"\n")
grDevices::dev.off()
###
### Local variables: ***
### mode: outline-minor ***
### outline-regexp: "\\(> \\)?### [*]+" ***
### End: ***
quit('no')
2010/4/22 Dennis Murphy <djmuser@gmail.com>
> Hi Jane,
>
> I was just hoping to save you some duplicate work, but it's probably
safer
> to compile for both because the latest Revolution Computing free version
> is 2.10.1 and will probably stay that way for a while. Hopefully you
don't
> need a new set of tools for 2.11, though. It's not that unusual for
> examples
> to crash in new installations; it's usually something subtle like a new
> feature
> or a bug fix in a program that may or may not be related to your code. Just
> ram the examples through a debugger.
>
> Have fun,
> Dennis
>
>
> On Wed, Apr 21, 2010 at 8:22 PM, rusers.sh <rusers.sh@gmail.com>
wrote:
>
>> Hi Dennis,
>> I mean the V2.10.1. :-)
>> 2010/4/21 Dennis Murphy <djmuser@gmail.com>
>>
>>> Hi Jane,
>>>
>>> The new version of R is coming out tomorrow, if you weren't
already aware
>>> of that... :)
>>>
>>> HTH,
>>> Dennis
>>>
>>> On Wed, Apr 21, 2010 at 4:29 PM, rusers.sh
<rusers.sh@gmail.com> wrote:
>>>
>>>> Hi all,
>>>> Today, i just installed the newest R version 2.10.1 and
other
>>>> necessary
>>>> tools for building R package under windows,e.g. Rtools, perl.
All are
>>>> the
>>>> newest version.
>>>> After the correct configuration under windows, i use it to
re-check my
>>>> old
>>>> package. I found the following prolem when checking EXAMPLE,
which did
>>>> not
>>>> exist before this re-installation.
>>>> ########
>>>> * checking examples ... ERROR
>>>> Running examples in 'stam-Ex.R' failed.
>>>> ########
>>>> I used "\dontrun{} % enddontrun" in all the examples
that should be no
>>>> problem, i think. I checked my package before and did not find
errors.
>>>> Any ideas on this?
>>>> Thanks a lot.
>>>>
>>>> --
>>>> -----------------
>>>> Jane Chang
>>>> Queen's
>>>>
>>>> [[alternative HTML version deleted]]
>>>>
>>>> ______________________________________________
>>>> 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.
>>>>
>>>
>>>
>>
>>
>> --
>> -----------------
>> Jane Chang
>> Queen's
>>
>
>
--
-----------------
Jane Chang
Queen's
[[alternative HTML version deleted]]