[R] Am having trouble calling a function

2011-08-27 Thread James Rome
In my main R program, I have source(retaanalysis/Functions/doAirport.R) stuff to read data and calculate ads sapply(ads,function(x) {doAirport(x, base)} ) And doAirport has # analyze the flights for a given airport doAirport = function(df, base) { # Get rid of unused runway factor

Re: [R] Am having trouble calling a function

2011-08-27 Thread Carl Witthoft
First of all, please replace your = with - per general R-usage rules. Next: you need to provide a clear listing of doAirport.R so we can tell what it actually is, and what you've done outside the function. That said, my suspicion is that your parent function (the one which calls doAirport)

Re: [R] Am having trouble calling a function

2011-08-27 Thread jim holtman
Add the following to your script: options(error=utils::recover) (actually put it in you Startup script), then learn how to use the debugging in R. On the error, this should provide a trace of the stack so that we know where the error occurs. By learning how to use debug/browser, you will be