-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I recently tested the Windows port of rkward to see if it might be
useable for a statistics class this semester. Overall, it is better than
I had expected for an initial port, so good job to all those involved!
On the installation, I was able to install the rkward binary under XP
Pro following the instructions on the wiki with KDE 4.3 packages built
with the MinGw 4.x compiler (with a R 2.9.0 backend). However, rkward
did not start initially because it said it could not find libpcre.dll
(which is supposed to be in KDE/bin I gather). This just seems to be a
dependency problem. I was able to get around it by putting a separate
copy of pcre3.dll into KDE/bin and renaming it libpcre.dll but there is
probably a way to do that automatically.
In using it, rkward does not crash that much. I did observe an odd
problem that if you run many lines of code that take a long time to
execute, when it is finished the main rkward window disappears but
rkward consumes 100% of the CPU resources and I had to kill the process.
This can be seen from running the attached R script, which I built to
run (almost) all the examples through rkward from the "base", "stats",
"utils", "graphics", and packages "grDevices" (other recommended
packages could easily be added). Hopefully, the script is pretty
self-explanatory.
It can crash when certain examples are run, but most of the time they
are not 100% reproducible. In particular, I sometimes had crashes with
the examples from "anova.mlm", "check.options", "close.screen", and
"erase.screen" but only when run with all the other examples in the
script. If you run those examples individually, they seem to be okay.
Some other examples are skipped because they cause rkward to raise a
popup menu, which is the expected behavior but prevents the script from
continuing automatically, or because the examples require the user to
click on a plot to continue. There are a few more examples that cause an
error (sometimes) but not a crash, which are skipped and some of those
are probably expected behavior.
Maybe in the future a script like this can be run before each release on
all supported platforms to check for problems? The script is pretty easy
to expand or customize for different platforms.
Thanks,
Ben
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkqFfXAACgkQzQDSXIcN85kX7wCeMxl934QkJMZUCR2QZL9ZjQZw
B8MAn2x9LkZOkNikuEUcGhnKk7PoQmOc
=K8Dy
-----END PGP SIGNATURE-----
myexample <-
function (topic, package = NULL, lib.loc = NULL, local = FALSE,
echo = TRUE, verbose = getOption("verbose"), setRNG = FALSE,
ask = getOption("example.ask"), prompt.prefix = abbreviate(topic,
6))
{
# topic <- substitute(topic) # to avoid error
if (!is.character(topic))
topic <- deparse(topic)[1L]
INDICES <- .find.package(package, lib.loc, verbose = verbose)
file <- index.search(topic, INDICES, "AnIndex", "R-ex")
if (file == "") {
warning(gettextf("no help file found for '%s'", topic),
domain = NA)
return(invisible())
}
packagePath <- dirname(dirname(file))
if (length(file) > 1L) {
packagePath <- packagePath[1L]
warning(gettextf("more than one help file found: using package '%s'",
basename(packagePath)), domain = NA)
file <- file[1L]
}
pkg <- basename(packagePath)
lib <- dirname(packagePath)
zfile <- zip.file.extract(file, "Rex.zip")
if (zfile != file)
on.exit(unlink(zfile))
if (!file.exists(zfile)) {
warning(gettextf("'%s' has a help file but no examples file",
topic), domain = NA)
return(invisible())
}
if (pkg != "base")
library(pkg, lib.loc = lib, character.only = TRUE)
if (!is.logical(setRNG) || setRNG) {
if ((exists(".Random.seed", envir = .GlobalEnv))) {
oldSeed <- get(".Random.seed", envir = .GlobalEnv)
on.exit(assign(".Random.seed", oldSeed, envir = .GlobalEnv))
}
else {
oldRNG <- RNGkind()
on.exit(RNGkind(oldRNG[1L], oldRNG[2L]))
}
if (is.logical(setRNG)) {
RNGkind("default", "default")
set.seed(1)
}
else eval(setRNG)
}
encoding <- if (length(enc <- localeToCharset()) > 1L)
c(enc[-length(enc)], "latin1")
else ""
zz <- readLines(zfile, n = 1L)
if (length(grep("^### Encoding: ", zz)) &&
!identical(Sys.getlocale("LC_CTYPE"),
"C"))
encoding <- substring(zz, 15L)
skips <- 0L
if (echo) {
zcon <- file(zfile, open = "rt")
while (length(zz) && !length(grep("^### \\*\\*", zz))) {
skips <- skips + 1L
zz <- readLines(zcon, n = 1L)
}
close(zcon)
}
if (ask == "default")
ask <- echo && grDevices::dev.interactive(orNone = TRUE)
if (ask) {
if (.Device != "null device") {
oldask <- grDevices::devAskNewPage(ask = TRUE)
if (!oldask)
on.exit(grDevices::devAskNewPage(oldask), add = TRUE)
}
op <- options(device.ask.default = TRUE)
on.exit(options(op), add = TRUE)
}
source(zfile, local, echo = echo, prompt.echo = paste(prompt.prefix,
getOption("prompt"), sep = ""), continue.echo = paste(prompt.prefix,
getOption("continue"), sep = ""), verbose = verbose,
max.deparse.length = Inf, encoding = encoding, skip.echo = skips,
keep.source = TRUE)
}
pkgs <- c("base", "stats", "utils", "graphics", "grDevices")
# These cause rwkard to crash, at least sometimes
CRASH <- c("anova.mlm", "check.options", "close.screen", "erase.screen")
# These cause script to terminate with an error, but expected behavior in some
cases
ERROR <- c("geterrmessage", "match.fun", "addmargins", "browseEnv",
"wsbrowser", "check.options")
# These sometimes cause the script to terminate with an error, so not the
expected behavior
RANDOM <- c("closeAllConnections", "stderr")
# These cause rkward to raise a popup, which prevents the script from running
automatically but is expected behavior
POPUP <- c("library", "print.libraryIQR", "print.packageInfo", "readline",
"require", "stop", "stopifnot", "trace", "tracingState", "untrace",
"?", "Filters", "RSiteSearch", "data", "demo", "help",
"loadRconsole", "package.skeleton", "promptPackage", "vignette", "file.access",
"file.info", "file.create", "file.show", "file.copy", "file.exists",
"file.rename", "file.symlink", "file.append", "file.remove",
"choose.files", "help", "help.search", "read.ftable", "write.ftable",
"choose.dir")
# These cause the user to have to click a plot to continue, due to the example
calling example() but not passing on ask=FALSE. Not a bug in rkward
CLICK <- c("add1", "drop1", "lag.plot", "plot.lm", "plot.mlm", "step",
"weighted.residuals", "example", "plot.design")
SKIP <- c(CRASH, ERROR, RANDOM, POPUP, CLICK)
for(RKWARD_PKG in pkgs) {
foos <- ls(paste("package", RKWARD_PKG, sep = ":"))
for(RKWARD_FUN in foos) {
if(RKWARD_FUN %in% SKIP) next
print(RKWARD_FUN)
cat(RKWARD_FUN, file=file.path("C:", "Temp", "RKWARD_FUN.txt")) # consider
changing; look here if rkward crashes
myexample(RKWARD_FUN, package=RKWARD_PKG, ask = FALSE, local = TRUE)
}
}
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel