Hi,
I have a piece of R code that calls mgcv::gam. The code runs fine in the
interactive mode, but terminates R w/o a single message when run
non-interactively. Though I think I should be able to locate the problem
by brute force I'd appreciate an advise how to do it more intelligently
using R debugging tools.
At this time I only know that it has something to do with me loading my
custom library, vor, in .Rprofile.
I use R-1.9.1 on RH7.3.
Following the posting guide I include an example (note that it may work
for you fine since you don't have my .Rprofile).
This is debug.R file:
#=============
dataLength <- 1e3
y <-rnorm(dataLength)
x <- rnorm(dataLength)
library("mgcv")
cat("before\n")
xy.gam <- gam(y ~ s(x), knots=list(place.knots(x, 25)), fit=FALSE)
cat("after\n")
# Here I run it non-interactively from the shell. Note that the last
line, cat("after\n"), doesn't get executed. (it does get executed in the
interactive mode or with --no-init-file)
~% R --no-save --no-restore --silent < debug.R
.First.lib of vor
> dataLength <- 1e3
> y <-rnorm(dataLength)
> x <- rnorm(dataLength)
>
> library("mgcv")
This is mgcv 1.0-9
>
> cat("before\n")
before
>
> xy.gam <- gam(y ~ s(x), knots=list(place.knots(x, 25)), fit=FALSE)
~%
Thanks,
Vadim
[[alternative HTML version deleted]]
______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html