[R] Problems with source() function
Seth Falcon
sfalcon at fhcrc.org
Fri Oct 28 15:57:33 CEST 2005
On 28 Oct 2005, aldeluis at usal.es wrote:
> Thank you for your answer :)
>
> I've tested your suggestion but without success. The remote load
> process is truncated silently using
>
> source(textConnection(readLines(url(http://...)))
>
> when look at the contents there's not a fixed point of break, is
> different each time I execute the command. Therefore the dropped
> lines are different every time. It seems the only constant is the
> time of the interruption (1 min 55 secs in my system).
I'm not sure exactly what you are trying to accomplish, but I wonder
if either of the following two ideas would help you:
1. Instead of source(), consider loading the R code on the server side
and then using save(..., compres=TRUE) to create a binary image.
You can then feed that to the clients and have them use load().
2. What happens if you gzip the code before sending and gunzip on the
client side. It may be less convenient, although supposedly there
is a way to do the equivalent of gzfile(url(...)).
HTH,
+ seth
More information about the R-help
mailing list