I have a dataframe with rows corresponding the the upper and lower limits of confidence intervals for a parameter. If there are n rows, there are n variables. There are two columns, one with the lower confidence interval limit “lower” and one for the “upper” limit. The row names correspond to the variable names. Something like this
lower upper
y1 7.923 9.22
y2 7.105 8.74
y3 8.185 9.54
y4 8.157 9.51
I would like to create a plot to display these confidence intervals as bars, preferably with flanges at each end.
If someone could tell me a good way to do this I would be grateful !
Thanks
PS
bwplotinlatticemakes box-and-whisker plots:See
?bwplotand?latticefor more detail.In general, you can use the full power of R by letting the plot function summarise the dat for you. For example: