[R] cannot open connection: Authorization Required
Bernardo Rangel Tura
tura at centroin.com.br
Sun Oct 5 15:37:09 CEST 2008
Em Sex, 2008-10-03 às 11:22 -0700, Spencer Graves escreveu:
> Hi, All:
>
> Is there a way in R to access a file / web site that requires
> permission?
>
> 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'
>
>
> Thanks,
> Spencer Graves
Spencer, this is a local problem in my system
>
> > readLines('http://www.r-project.org/')
> [1] "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
> [2] "<html>"
> [3] "<head>"
> [4] "<title>The R Project for Statistical Computing</title>"
> [5] "<link rel=\"icon\" href=\"favicon.ico\" type=\"image/x-icon\">"
> [6] "<link rel=\"shortcut icon\" href=\"favicon.ico\" type=\"image/x-icon\">"
> [7] "<link rel=\"stylesheet\" type=\"text/css\" href=\"R.css\">"
> [8] "</head>"
> [9] ""
> [10] "<FRAMESET cols=\"1*, 4*\" border=0>"
> [11] "<FRAMESET rows=\"120, 1*\">"
> [12] "<FRAME src=\"logo.html\" name=\"logo\" frameborder=0>"
> [13] "<FRAME src=\"navbar.html\" name=\"contents\" frameborder=0>"
> [14] "</FRAMESET>"
> [15] "<FRAME src=\"main.shtml\" name=\"banner\" frameborder=0>"
> [16] "<noframes>"
> [17] "<h1>The R Project for Statistical Computing</h1>"
> [18] ""
> [19] "Your browser seems not to support frames,"
> [20] "here is the <A href=\"navbar.html\">contents page</A> of the R Project's"
> [21] "website."
> [22] "</noframes>"
> [23] "</FRAMESET>"
> [24] ""
> [25] ""
> [26] ""
I run R.2.7.2 in Ubuntu AMD 64 machine
--
Bernardo Rangel Tura, M.D,MPH,Ph.D
National Institute of Cardiology
Brazil
More information about the R-help
mailing list