[R] Problem with lm

Rolf Turner rolf.turner at xtra.co.nz
Mon Nov 5 19:58:16 CET 2012


On 06/11/12 05:20, Eva Prieto Castro wrote:
> Hi,
>
> I solved as follws:
>
> Â f <- formula(y ~ x1 + x2)
> Â  single <- do.call("lm", list(f, data=mydf))
>
> It works in every machine!!.

Well, if you are happy with the result, I guess that can't be argued with.

However the fact that your previous attempts worked on some machines
and not on others indicates to me that something fundamentally wrong
is going on somewhere.  If it were *my* package I'd want to track it down,
figure out exactly why this anomaly was happening, and fix it from an
informed point of view.  Just trying things more or less at random until
something works is not a good strategy for writing robust and reliable
code.

It seems to me that resorting to the use of do.call() should not be 
necessary,
and it is not at all clear to me why this should help with the "no 
encontrado"
problem anyway.

     cheers,

         Rolf




More information about the R-help mailing list