Dear R-Experts, I seem to be dealing with a so called "headless" problem in R.
I wrote a quite extensive program that generates a Bayesian network from a query protein's Phylogenetic Tree and subsequently uses a message passing algorithm to infer the most likely annotation for the query leaf in the tree using the other leaves known -and proven- protein function annotations. The program uses the following libraries: library(tools) library(Biostrings) library(RCurl) library(stringr) library(ape) library(gRain) # gRain implements the message passing algorithm library(RMySQL) library(XML) library(parallel) library(brew) library(xtable) When the program is run from the command line as: Rscript prog.r inp.file with certain input data "inp" it gets stuck and does not terminate ever. Memory usage sky-rockets and the process spends almost all of its time on system calls. Using the identical R code inside an interactive R shell with the very same input data "inp" the script does not have any problems and finishes actually amazingly fast. I am flabbergasted and do require help. Hence my questions: * Is anything known about a problem similar to mine appearing when using the above libraries? * What is the difference -aside from the obvious missing interactiveness- between running the very same R code inside an interactive R shell or inside a file as an argument to Rscript? * Does my problem indeed fall into the "headless" category? The problem occurs in R version 2.15.2 (2012-10-26) -- "Trick or Treat" on Debian 6.0.2 uname -or gives 3.2.0-0.bpo.3-amd64 GNU/Linux Any help will be much appreciated. Have a pleasant day! ______________________________________________ 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.