[R-sig-Geo] function classIntervals {classInt}: arguments over/under/between
Pascal Oettli
kridox at ymail.com
Wed Jun 12 11:34:52 CEST 2013
Hi,
From the help file:
"From version 0.1-11, the default representation has been changed to use
cutlabels=TRUE, and representation within intervals has been corrected,
thanks to Richard Dunlap."
You need to use cutlabels=FALSE
print(classIntervals(jenks71$jenks71, n = 5, style = "equal"), cutlabels
= FALSE, between = "-", under = "<", over = ">")
Regards,
Pascal
On 12/06/13 18:17, RINNER Heinrich wrote:
> Hello,
>
> while making some choropleth maps wit R (version 3.0 under Windows7) I ran into an issue with function classIntervals (in package classInt):
> I'm not able to change the character string value for "over"/"under"/"between" in printed table labels.
>
> For example:
>> library(classInt)
>> data(jenks71)
>> classIntervals(jenks71$jenks71, n = 5, style = "equal")
> style: equal
> one of 3,921,225 possible partitions of this variable into 5 classes
> [15.57,43.516) [43.516,71.462) [71.462,99.408) [99.408,127.354) [127.354,155.3]
> 35 44 17 4 2
>> classIntervals(jenks71$jenks71, n = 5, style = "equal", between = "-")
> style: equal
> one of 3,921,225 possible partitions of this variable into 5 classes
> [15.57,43.516) [43.516,71.462) [71.462,99.408) [99.408,127.354) [127.354,155.3]
> 35 44 17 4 2
>
> --> It seems to me that arguments "over"/"under"/"between" are being ignored, setting them has no effect on the output?
>
> I tried with findColours as well, also with no effect:
>> x <- classIntervals(jenks71$jenks71, n=5, style="equal")
>> findColours(x, pal = 1:5, between = "-")
> [...]
> attr(,"table")
> [15.57,43.516) [43.516,71.462) [71.462,99.408) [99.408,127.354) [127.354,155.3]
> 35 44 17 4 2
>
> I have seen examples (Fig. 3.5 in the book "Applied Spatial Data Analysis with R") where classIntervals has behaved differently (?), so maybe something has changed here, or I am missing something?
> What can I do to make this work?
>
> Kind regards,
> Heinrich.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
More information about the R-sig-Geo
mailing list