Matjaz Kukar <[EMAIL PROTECTED]> writes:
> My workaround for now is as follows: > > fun = Rf_findVar(Rf_install(ident), R_GlobalEnv); > if (fun != R_UnboundValue) { > fun = Rf_findFun(Rf_install(ident), R_GlobalEnv); > R_tryEval(fun, ...); > } > > I did some checking on the R object pointers and indeed for generic functions > Rf_findFun and Rf_findVar return different pointers (and therefore different > function objects). > > What has changed with these functions? Can you comment on my workaround > and suggest a better (proper?) way of doing this? Can't see anything relevant changed recently... I can see that findFun gives an error if the function is not found, which I presume is what you call a "crash". However, your workaround wouldn't catch the situation where a variable exists, but none of the versions in the search path are functions. I think you want to use findVar1() instead. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel