Displaying 1 result from an estimated 1 matches for "library_loc".
2006 Nov 07
3
have I an actual matrix?
...data.
I am trying to get data from a MySQL database and plotting it with
barplot. Here the code...
library(RMySQL)
con <- dbConnect(dbDriver
("MySQL"),host='localhost',username='root',dbname='ibdona')
rs <- dbGetQuery (con,"select n,year from ibdona.library_location")
dbDisconnect(con)
Graph <- barplot(rs)
And here the error I get...
Error in barplot.default(rs) : 'height' must be a vector or a matrix
paste(rs) gives me...
[1] "c(307, 65, 2, 28, 3, 229, 81, 5, 7, 558, 134, 53, 9)"
[2] "c(2002, 2002, 2002, 2002, 2002, 200...