[R] Installing RMySQL on Windows XP for R 1.9.1
Henrik Bengtsson
hb at maths.lth.se
Mon Aug 9 12:00:55 CEST 2004
The code snippet was incorrect; here the correct one (I hope)
library(RODBC)
channel <- odbcConnect("MyDatabase", uid="root") # or some other username
df <- sqlQuery(channel, "select * from myTable")
/Henrik
> -----Original Message-----
> From: Henrik Bengtsson [mailto:hb at maths.lth.se]
> Sent: Monday, August 09, 2004 11:59 AM
> To: 'Robert Wania'; 'r-help at stat.math.ethz.ch'
> Subject: RE: [R] Installing RMySQL on Windows XP for R 1.9.1
>
>
> Hi, I cannot help you install RMySQL on Windows, but most
> likely RMySQL contains non-R code too, such as C code, that
> requires compilation and then your gunzip-untar-rezip
> approach will not work.
>
> For your information, you can use the RODBC package instead.
> I recently downloaded and installed a MySQL server on my
> Windows XP *Pro* machine. Then I use the RODBC package (on
> CRAN and installs directly on Windows) to connect to it. In
> order for this to work you have to have an ODBC service
> running on your machine. You will find one for most Windows
> versions called MyODBC on the mysql.com download pages (links
> at the right margin). When it works you will be connected to
> you db from R by
>
> library(RODBC)
> channel <- odbcConnect("MyDatabase", uid="root") # or some
> other username
> df <- sqlQuery("select * from myTable")
>
> See also ?RODBC. I just did the above two days ago from
> scratch and it was pretty easy. I won't time to help you more
> now since I'm writing up my thesis...
>
> Cheers
>
> Henrik Bengtsson
>
>
> > -----Original Message-----
> > From: r-help-bounces at stat.math.ethz.ch
> > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Robert Wania
> > Sent: Monday, August 09, 2004 11:34 AM
> > To: r-help at stat.math.ethz.ch
> > Subject: [R] Installing RMySQL on Windows XP for R 1.9.1
> >
> >
> > Hi,
> >
> > I'm thankful for any help on installing RMySQL on Windows XP
> > for R 1.9.1
> >
> > The thread http://tolstoy.newcastle.edu.au/R/help/04/01/1021.html
> > already tried to discuss the matter. It concludes that
> > Windows Sources for Packages are alike the Linux ones.
> >
> > So I extracted the files from the RMySQL_*.tar.gz from
> > http://stat.bell-labs.com/RS-DBI/download/index.html
> > and stuffed them into a zip-file which was willingly taken by
> > the install routine of my RGui. It said the well known
> > "updating HTML package descriptions" but when using
> > library(RMySQL) the error "Error in testRversion(descfields)
> > : This package has not been installed properly. See the Note
> > in ?library". Obviously the note wasn't very helpful and so I
> > ask you for any help.
> >
> > Regards
> > Robert
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> > http://www.R-project.org/posting-guide.html
> >
> >
>
More information about the R-help
mailing list