plot - Simple Grouped Barplot in R Studio -
plot - Simple Grouped Barplot in R Studio -
i need help simple barplot in rstudio, statistics exam.
i have 4 srs estimated mean , variance. have info frame these errors:
i create barplot show errors in simulation, both mean , variance. obtain this:
for illustration mean errors in bluish bars , variance errors in reddish bars; each simulation.
how can plot this?
i found plot in figure here , of course of study tried code, if write this:
counts <- table(errors$meanerr,errors$varerr)
the result is:
counts 0.00580614250942646 0.00748139367270056 0.0110175973333068 0.242217731442113 0.00565617345884917 1 0 0 0 0.0235702639434603 0 1 0 0 0.0720161457747945 0 0 1 0 0.33541066066671 0 0 0 1
and
barplot(counts, names = c(10,100,1000,10000),legend = c("mean","variance"), beside=true,xlab = "number of elements", ylab = "error",col=c("red","darkblue"))
give this: because, think, utilize 1 , 0 value within table created.
i @ origin r programming help me.
r plot bar-chart
Comments
Post a Comment