Archives
Categories
Tag Archives: R Tips
Querying Databases From R on a Mac
I use a mac, currently running OS 10.6 / Snow Leopard, and I’d like to query our greenplum / postgres database from R. This used to work with R 2.9, but I unfortunately had to upgrade R, and R 2.10 … Continue reading
Posted in Data Munging, R, R Tip
Tagged greenplum, postgres, R and Databases, R Tips
Leave a comment
Querying Postgres or Greenplum from R on a Mac
So, I’m using snow leopard, and I want to query our postgres / greenplum database. First things first: I’m familiar with the RODBC package on CRAN. This installs fine, since it’s a binary package. I also installed the ODBC Administrator … Continue reading
Posted in Data Munging, R, R Tip
Tagged greenplum, postgres, R and Databases, R Tips
Leave a comment
Querying Databases in R, on Mac OS
Unfortunately, it appears with the recent release of 10.6 / Snow Leopard Apple has removed the ODBC Administrator Tool from the OS. It can still be downloaded from Apple.
Querying Databases in R
One of the first things you’ll want to do in R is set it up to talk to databases. The easiest way to do this is using ODBC, via package RODBC. To get the package, run > install.packages(RODBC) Once you … Continue reading
Posted in Data Munging, R, R Tip
Tagged data frame, greenplum, mysql, postgres, R and Databases, R Tips
Leave a comment
R Dates – Recovering and Converting From Integers
One problem with R is that dates (class Date) are internally stored as integer numbers of days elapsed since 1 January 1970 and R sometimes loses the dateness of the variables and thinks of it only as an integer. So … Continue reading
Removing Extra Column of Data from CSVs in R — R Tip
When R writes a csv file, you get an extra column of data as such: > s > plot(x=s$x, y=s$y ) > > write.csv(x=s, file=’s0.csv’ ) When you peek in the csv file, you see this: blog earl$ head s0.csv … Continue reading