[R] unable to access index for repository

Duncan Murdoch murdoch.duncan at gmail.com
Sat Feb 26 15:52:08 CET 2011


On 11-02-25 6:15 PM, Kalicin, Sarah wrote:
> Hi,
> I have two questions:
>
>
> 1)      Since I switched to Windows 2007 and downloaded the current R version (2.12.1; 2010-12-16) for Windows 7 a month ago, I cannot down load packages through the GUI drop down menu. I get: Warning: unable to access index for repository http://cran.cnr.Berkeley.edu/bin/windows/contrib/2.12
>
> Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.12
>
> Warning messages:
>
> 1: In open.connection(con, "r") :
>
>    unable to connect to 'cran.r-project.org' on port 80.
>
> In fact, just to assign the CRAN location in the drop down menu takes forever. From web searches, the first check is to see if you have internet access. I do and can download the packages directly to my hard drive and load them indirectly into R by using library(MASS, lib.loc="C:\\Users\\R\\R packages"). This is starting to become a pain. Any suggestions on looking at potential security settings that I might need to deactiviate or any other issues?

You've probably got a firewall or proxy getting in the way.  You could 
re-install R with the "internet2" option, or run setInternet2(TRUE) in a 
session to fix this.  (Or maybe you already did that, in which case 
setInternet2(FALSE) will turn it off.)



> 2)      Any suggestions how I can connect to a MySQL database through windows using R. I found this example on the web, but there is not a package for RMYSQL for windows. Bugger!!!
>
> library(RMySQL)
>
> drv = dbDriver("MySQL")
>
> con = dbConnect(drv,host="mars",dbname="sat133",user="sat133",pass="T0pSecr3t")
>
> album = dbGetQuery(con,statement="select * from tasks")

Install an ODBC driver for MySQL, and use RODBC.

Duncan Murdoch

>
>
>
>
>
> Thanks for any input!!
>
> Sarah
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list