R- Graphing continuous data as a barplot with nonequal subsets -


i looking display dataset barplot in order show domains of data have more range variation others. although have found ways set barplot data domain broken down number of equal subsets, have not been able find way dictate numerical cutoffs of these subsets. cut() function has been giving me trouble, may because relatively new r.

the scatterplot representation of dataset working is: zooplankton.data. able display average species diversity score each discrete ph score, such average score ph <4, ph <= 4 | ph < 5, etc. each own bar.

the way have been trying solve using:

ph.bins<-cut(zoo$ph, c(3,4,5,6,7,8))  bar.ph <- tapply(zoo$species.diversity, list(zoo$ph.bins), mean)  barplot(bar.ph,      main="average species diversity score ph",      xlab = "ph",     ylab = "average species diversity",     col = "blue",     ylim = c(3,8)) par(new=f) 

unfortunately, keep getting error telling my tapply() arguments need same length, , not sure how proceed. suggestions?


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -