lattice - Add SD to dotplot in R -
i trying make graphs in r , have problem can't solve. use dotplot
function plot mean of 16 treatments. works out pretty well, on y axis variables (treatment names) , on x axis value. want add standard deviation points , tried different things found via internet doesn't work. if me (in easy way), happy!
thank reading this!
i have:
library(lattice) d2 <- colmeans(d, na.rm=true) var.labels <- f ### f includes names of treatments sd <- sd(d, na.rm=true) new.data <- data.frame(var.labels=factor(var.labels, levels=f), d2, sd) dotplot(var.labels~d2, data=new.data)
one possible solution might be:
dotplot(var.labels~d2+sd, data=new.data)
a nice comparison different dot-charts (standard r, lattice , ggplot2) can found here: summarising data using dot plots
hth
Comments
Post a Comment