[R] Hmisc break points error
David Winsemius
dwinsemius at comcast.net
Tue Nov 29 03:12:54 CET 2011
On Nov 28, 2011, at 7:06 PM, Emma wrote:
> I am making frequency histograms using the histbackback function on
> my 2 datasets. However when I try to use the brks function:
>
>
> foo<-histbackback(log(fie11),
> log(fie86),ylim=c(0,9),probability=FALSE,axes=TRUE,ylab=("log10
> Parcel Size"),brks=16)
>
> The graphic results in a 'NA' label for the y axis (no intervals are
> returned)
What do you get with str()"
> fool <- list(x=rnorm(40), y=rnorm(40))
> fbrks <- histbackback(fool, brks=c(-6, -2, -1,0,1,2, 6) )
> str(fbrks)
List of 3
$ left : int [1:6] 1 7 14 13 5 0
$ right : int [1:6] 1 6 16 12 3 2
$ breaks: num [1:7] -4.5 -3.5 -2.5 -1.5 -0.5 0.5 4.5
so fool$breaks should be the breaks.
>
> Also when I use 'summary(foo)' the break values are returned as
> follows:
>
> Length Class Mode
> left 9 -none- numeric
> right 9 -none- numeric
> breaks 1 -none- numeric
>
> Can I manually add the y axis back in so there are values displayed?
It is a base graphics implementation so you can use the title function
to put in ylab, and although the axis should have been put in you can
also use the axis() function.
--
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list