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 afterwards to assign this object to the global environment.

See ?assign

Maybe that can help some people.

--

<>< <>< <>< <><

Xochitl CORMON
+33 (0)3 21 99 56 84

Doctorante en écologie marine et science halieutique
PhD student in marine ecology and fishery science

<>< <>< <>< <><

IFREMER
Centre Manche Mer du Nord
150 quai Gambetta
62200 Boulogne-sur-Mer

<>< <>< <>< <><

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to