Re: [R] passing username and password to source()

From: Richard Rowe <>
Date: Wed, 13 Feb 2008 13:21:39 +1000

[Ricardo Rodriguez] Your XEN ICT Team wrote:
> Peter McMahan wrote:
>> try something like this:
>> username <- "abc"
>> pass <- "123"
>> source(paste("http://",username,":",pass,"",sep=""))
>> I'm not sure it'll work but it's worth a try.
> Thanks, Peter. It didn't work. I am guessing it depends in any way on
> the server this will work or won't work, doesn't it? Have you tried an
> http URL passing username and password with any public server I could
> try with? I've used this syntax with ftp sites, but never with http
> servers. I've tried here with several of the servers I've available and
> none of them seems to accept this syntax
I think this is a two stage process:

  1. you need to find what the server requires (check its documentation)
  2. work out how to deliver the appropriate text string from R

Until you determine step 1, speculating on step 2 is a waste of time,


Dr Richard Rowe
Zoology & Tropical Ecology
School of Marine & Tropical Biology
James Cook University
Townsville 4811

ph +61 7 47 81 4851
fax +61 7 47 25 1570
JCU has CRICOS Provider Code 00117J

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 13 Feb 2008 - 03:29:53 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 13 Feb 2008 - 23:30:14 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive