[R-sig-Geo] Question about under/over/between arguments in library(classInt)

Christopher T. Moore moor0554 at umn.edu
Mon Oct 12 22:52:50 CEST 2009


Greetings,

Has anyone else noticed a change in the behavior of the under/over/between 
arguments in the classInt package?

I utilized those arguments with classInt_0.1-9, but I haven't had any 
success with subsequent versions. I read the old and new help guides but 
couldn't see a change to the way those arguments must be submitted to the 
classIntervals() and findColours() functions. Perhaps I've overlooked a 
change?

In the meantime, I have gone back to using classInt_0.1-9. Below is a 
reproducible example.

Please let me know if you have any insights that would allow me to use the 
under/over/between legend arguments with the most recent version. Thanks.

Regards,
Chris

--
Christopher T. Moore, M.P.P.
Doctoral Student
Quantitative Methods in Education
University of Minnesota
44.9785°N, 93.2396°W
moor0554 at umn.edu
http://umn.edu/~moor0554



> ########################################
> utils:::menuInstallPkgs()
--- Please select a CRAN mirror for use in this session ---
trying URL 
'http://probability.ca/cran/bin/windows/contrib/2.9/classInt_0.1-12.zip'
Content type 'application/zip' length 73875 bytes (72 Kb)
opened URL
downloaded 72 Kb
package 'classInt' successfully unpacked and MD5 sums checked
> plotvar <- 1:9
> nclr <- 3
> library(RColorBrewer)
> plotclr=brewer.pal(nclr,"Blues")
> library(classInt)
Loading required package: class
Loading required package: e1071
> (class <- classIntervals(plotvar, nclr, style="quantile"))
style: quantile
  one of 28 possible partitions of this variable into 3 classes
       [1,3.666667) [3.666667,6.333333)        [6.333333,9] 
                  3                   3                   3 
> (colcode <- findColours(class, plotclr, digits=3, between="to", 
> under="<", over=">="))
[1] "#DEEBF7" "#DEEBF7" "#DEEBF7" "#9ECAE1" "#9ECAE1" "#9ECAE1" "#3182BD" 
"#3182BD" "#3182BD"
attr(,"palette")
[1] "#DEEBF7" "#9ECAE1" "#3182BD"
attr(,"table")
       [1,3.666667) [3.666667,6.333333)        [6.333333,9] 
                  3                   3                   3 
> sessionInfo()
R version 2.9.2 (2009-08-24) 
i386-pc-mingw32 
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] classInt_0.1-12 e1071_1.5-19 class_7.2-48 RColorBrewer_1.0-2


> utils:::menuInstallLocal()
package 'classInt' successfully unpacked and MD5 sums checked
updating HTML package descriptions
> plotvar <- 1:9
> nclr <- 3
> library(RColorBrewer)
> plotclr=brewer.pal(nclr,"Blues")
> library(classInt)
Loading required package: class
Loading required package: e1071
> (class <- classIntervals(plotvar, nclr, style="quantile"))
style: quantile
  one of 28 possible partitions of this variable into 3 classes
     under 3.666667 3.666667 - 6.333333       over 6.333333 
                  3                   3                   3 
> (colcode <- findColours(class, plotclr, digits=3, between="to", 
> under="<", over=">="))
[1] "#DEEBF7" "#DEEBF7" "#DEEBF7" "#9ECAE1" "#9ECAE1" "#9ECAE1" "#3182BD" 
"#3182BD" "#3182BD"
attr(,"palette")
[1] "#DEEBF7" "#9ECAE1" "#3182BD"
attr(,"table")
      < 3.67 3.67 to 6.33      >= 6.33 
           3            3            3 
> sessionInfo()
R version 2.9.2 (2009-08-24) 
i386-pc-mingw32 
attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     
other attached packages:
[1] classInt_0.1-9 e1071_1.5-19 class_7.2-48 RColorBrewer_1.0-2
> ########################################



More information about the R-sig-Geo mailing list