[R] cannot open connection: Authorization Required

Spencer Graves spencer.graves at pdf.com
Fri Oct 3 20:22:33 CEST 2008

Hi, All: 

      Is there a way in R to access a file / web site that requires 

      Consider for example the following: 

 > readLines('http://www.r-project.org/', 4)
[1] "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
[2] "<html>"                                                          
[3] "<head>"                                                          
[4] "<title>The R Project for Statistical Computing</title>"  

 > readLines(URL) # URL = web address, which I can see via manual access. 
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
  cannot open: HTTP status was '401 Authorization Required'

      Spencer Graves

More information about the R-help mailing list