Re: [R] Loading .RData from Internet

2010-12-06 Thread Ivan Calandra
You can create a connection to the URL and load() the connection. Like this: con <- url('http://rss.acs.unt.edu/Rdoc/library/twang/data/raceprofiling.RData') load(file=con) close(con) str(raceprofiling) But the easiest way is to save the file and then load it. Ivan Le 12/6/2010 10:44, Rainer

Re: [R] Loading .RData from Internet

2010-12-06 Thread L
On Mon, Dec 6, 2010 at 8:29 PM, zhiji19 wrote: > > I tried the load() already. It does not work. The erro is shown as following: > > Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection > In addition: Warning message: > In readChar(con, 5L, useBytes = TRUE) : >  cannot open com

Re: [R] Loading .RData from Internet

2010-12-06 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/06/2010 10:29 AM, zhiji19 wrote: > > I tried the load() already. It does not work. The erro is shown as following: load() works - I downloaded the data and then used load() - it works. I don't know if load() accepts an URL as a source, because

Re: [R] Loading .RData from Internet

2010-12-06 Thread zhiji19
I tried the load() already. It does not work. The erro is shown as following: Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection In addition: Warning message: In readChar(con, 5L, useBytes = TRUE) : cannot open compressed file 'http://rss.acs.unt.edu/Rdoc/library/twang/dat

Re: [R] Loading .RData from Internet

2010-12-06 Thread Ivan Calandra
Try with load() instead of read.table() read.table() is for csv, txt... files. load() is for R files Ivan Le 12/6/2010 09:35, zhiji19 a écrit : Dear All, Can you please suggest me a correct way to load the following R data frame from the internet and save it to the hard drive? The following i

[R] Loading .RData from Internet

2010-12-06 Thread zhiji19
Dear All, Can you please suggest me a correct way to load the following R data frame from the internet and save it to the hard drive? The following is what I tried: > raceprofiling <- > read.table("http://rss.acs.unt.edu/Rdoc/library/twang/data/raceprofiling.RData";) > save(raceprofiling, file =