[R] read.table opening a website incl Password

Roland Rau roland.rproject at gmail.com
Wed May 16 18:38:59 CEST 2007


Dear all,

in the past I have been able to access websites with data directly. For 
example the following code works nicely

mydata <- 
read.table("http://www.lifetable.de/data/MPIDR/POL_2004.txt", 	header=TRUE)

But what happens if I need a username and password (a different site)? 
How do I do that? Or is it not possible to this in R?
I tried something like this

mydata.frame <- read.table("myusr:mypswd at www.mydata.com/adir/afile.txt")

but it did not work.
I'd appreciate any hints.
My platform is Win32 (and I am actually running R 2.3.1, but I guess 
(hope!) this is not the reason. At least I checked the NEWS file whether 
any changes appeared since 2.3.1 which could affect this behavior).

Thanks,
Roland



More information about the R-help mailing list