[R] some newbie problems with plotting and RPgSQL

maneesh@www.chip.org maneesh at www.chip.org
Wed Jul 18 00:19:40 CEST 2001

Dear R-enthusiasts,

What a wonderful package R is, many thanks to all you have contributed
(I've just started using it)...I have  a few questions that I am having
some trouble finding the answer to:

I am using RPgSQL to grab some data from a postgresql database (about 179
columns and a few thousand rows), and I want to do a lot of pairwise
comparison of the rows...(this is yeast genomic microarray data for those
who care)

I get to the database:

> db.connect(dbname="yeast")

and grab the first two rows like this:

> t<-sql.select(columns="*", from="gasch", limit=2)

then create two lists a la:

> a<-t[1,][4:length(t[1,])]
> b<-t[2,][4:length(t[2,])]

(the first 3 entries are text)

and now I just want to see a plot(a,b) but I always get the following

Error in plot.new() : Figure margins too large

(I even tried par(mar=c(0,0,0,0)))

Oddly I get the following behaviour:

> plot(seq(1,174),a)

works (the graph looks like it should)

but the reverse

> plot(a,seq(1,174))

gives me:

Error in plot.new() : Figure margins too large

similarly for b...so I am guessing the problem is passing my lists as the
first argument...

Manually getting the rows and making a text file that explictly states the
vectors and then sourcing the file  from R does plot(a,b) just fine....

If I understand the R classes correctly t is a dataframe and a and b are
lists (named by the column headings of the database)....

I'm sure there is something stupid I am doing....

Also I am little confused as to the meaning of t[0,] when I get the
data.frame back from my SQL query, if anyone happens to have any insight.

Many thanks,
Maneesh (please email to this address as I am not subscribed to the list)

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list