Depending on the argument values that are passed to barplot() a good vector to be used as xlim is returned.

hsBpGetXlim(myData, myWidth = 1, mySpace = NULL, myBeside = FALSE)

Arguments

myData

corresponding to "height" in barplot

myWidth

corresponding to "width" in barplot

mySpace

corresponding to "space" in barplot

myBeside

corresponding to "beside" in barplot

Value

vector of numeric of length two