[Rd] PROTECT and OCaml GC.
guillaume.yziquel at citycable.ch
Tue Dec 1 11:48:54 CET 2009
Guillaume Yziquel a écrit :
> One last thing, concerning the use of promises. If I do install,
> findVar, without forcing the resulting promise, and then construct the
> call, I get a failure:
>> # R.eval_langsxp (R.langsxp_of_list [(R.symbol "str"); (R.symbol
>> "lm")] 2);;
>> Erreur dans function (object, ...) : function générique incorrecte
>> dans 'UseMethod'
>> Exception: Failure "OCaml-R error in r_eval_sxp C stub.".
> If I force the promises:
>> # R.eval_langsxp (R.langsxp_of_list [(R.force (R.symbol "str"));
>> (R.force (R.symbol "lm"))] 2);;
>> function (formula, data, subset, weights, na.action, method = "qr",
>> model = TRUE, x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE,
>> contrasts = NULL, offset, ...) - : R.sexp = <abstr>
> It works.
> So you may say that "I'm not constructing it right", I still believe
> that describing precisely what kind of arguments is accepted by eval
> would a good thing.
It seems that Matjaz Kukar had the same kind of issue that I have with
I just remark two things from the resulting thread:
-1- He asks where to find a more precise documentation of the R API,
which is also something I'd be looking for,
-2- He has been suggested to use findVar1, which doesn't seem to be part
of the API.
Will be looking into findVar1, findFun, findVar, though I do not
understand why this fails in my case. Please feel free to enlighten me.
All the best,
More information about the R-devel