[R] passing username and password to source()

Richard Rowe richard.rowe at jcu.edu.au
Wed Feb 13 04:21:39 CET 2008


[Ricardo Rodriguez] Your XEN ICT Team wrote:
> Peter McMahan wrote:
>   
>> try something like this:
>>     username <- "abc"
>>     pass <- "123"
>>     
>> source(paste("http://",username,":",pass,"@mire.environmentalchange.net/~webmaster/R/3Dsurface.r",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,

Richard

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

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



More information about the R-help mailing list