Re: [R] Problems with source() function

From: Seth Falcon <>
Date: Fri 28 Oct 2005 - 23:57:33 EST

On 28 Oct 2005, 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 mailing list PLEASE do read the posting guide! Received on Sat Oct 29 00:08:31 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:52 EST