[R] passing username and password to source()

Dieter Menne dieter.menne at menne-biomed.de
Wed Feb 13 11:22:37 CET 2008


[Ricardo Rodriguez] Your XEN ICT Team <webmaster <at> xen.net> writes:

> Please, is it possible to pass an username and a password to source() to 
> access code stored in restricted access web server?
> 
> I know I can use commands like...
> 
>  > source("http://mire.environmentalchange.net/~webmaster/R/3Dsurface.r")
> 
> but I am not able to find if it is possible to pass authorization 
> parameters together with the link.

One way to handle this is to use Sys.setenv/Sys.getenv to pass parameters by
environment. Make sure, however, that this does not violate security, because
these parameter could be read by other programs. A quick workaround would be
that the receiving program immediately deletes the environment string, after
having read it.

Dieter



More information about the R-help mailing list