On Nov 8, 2006, at 11:41 AM, Michael Kubovy wrote: > On Nov 8, 2006, at 4:44 AM, Ricardo Rodríguez wrote: > > Hi Ricardo, > > You probably have two columns in 'rs'. You need to do the barplot > on one of them and use the other as the vector of labels. Assuming > that the first column is n and the second is years: > barplot(n, names.arg = years, xlab = 'years', ylab = 'number of > events') > > if the columns are not labelled: > barplot(rs[, 1], names.arg = rs[, 2], xlab = 'years', ylab = > 'number of events') > > For more details, > ?barplot > or > ?barplot2 > Also try RSiteSearch('barplot') > See also http://wiki.r-project.org/rwiki/doku.php? > id=graph_gallery:graph54
Thank you so much for the detailed answer, Michael. Once I've understood that I've been trying to plot a data frame without specifying the columns I wanted to use thing are going smoother over here! Your answer has directed me to the RGraphGallery. What a repository of great ideas! I do hope I can contribute in the near future. Just two tips: I don't know why, I am not able to use the link you have posted to reach graph 54. This one works for me... http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=54 As for my error trying to plot a data frame, ?dbGetQuery clearly states that the function returns a data.frame with the results of the query. 4.3.1 Packages DBI and RMySQL clearly reads the same thing, dbGetquery sends the query and retrieves the results as a data frame. So, I must apology. Only my lack of skills and a non attentive reading of the manuals have caused this doubt. Thanks for your help. With my best regards, Ricardo ______________________________________________ R-help@stat.math.ethz.ch 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.