Loading .RData from Internet
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 M Krug a ?crit :
-----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 that gave me IMMEDIATELY an error. Cheers, Rainer
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/data/raceprofiling.RData', probable reason 'Invalid argument'
- -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Natural Sciences Building Office Suite 2039 Stellenbosch University Main Campus, Merriman Avenue Stellenbosch South Africa Tel: +33 - (0)9 53 10 27 44 Cell: +27 - (0)8 39 47 90 42 Fax (SA): +27 - (0)8 65 16 27 82 Fax (D) : +49 - (0)3 21 21 25 22 44 Fax (FR): +33 - (0)9 58 10 27 44 email: Rainer at krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkz8sJQACgkQoYgNqgF2egr/owCdETedL3WT81cJ93WGL/8oCvi7 aAgAniZtSnlK2jBcSeIUXGffls+fdZ3n =LVfP -----END PGP SIGNATURE-----
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Ivan CALANDRA PhD Student University of Hamburg Biozentrum Grindel und Zoologisches Museum Abt. S?ugetiere Martin-Luther-King-Platz 3 D-20146 Hamburg, GERMANY +49(0)40 42838 6231 ivan.calandra at uni-hamburg.de ********** http://www.for771.uni-bonn.de http://webapp5.rrz.uni-hamburg.de/mammals/eng/1525_8_1.php