[R] Problem running stepAIC within a function.

2015-02-03 Thread Xochitl CORMON
I know it is pretty old but it seems that nobody answer this question. I ran into similar problem and the work around I found use the assign function. Indeed it seems than stepAIC look for the element it needs within the global environment. So if you define an object inside a function, you need

[R] Problem running stepAIC within a function.

2012-03-03 Thread uzuria
Hi I need to a function that automatically fits a regression to data, using the stepAIC. I've ran the code manually and it works fine. However, when I run the function on the same data, the following error occurs: Problem in regimp(fullsim = simt, fullsim1 = simt1,..: Length of (weights) (variabl