Skip to content
Prev 4847 / 29559 Next

colorkey print order is incorrect??

On Mon, 19 Jan 2009, Jim Burke wrote:

            
Yes, very nice! Your variable CK_PCT is clearly a categorical variable, 
with a % in it, and has been sorted correctly, as "100.00%" < "14.29%" in 
alphanumeric sort order. Maybe:

tx3_sp$nCK_PCT <- (100*tx3_sp$CK_TOT)/tx3_sp$TOT_VOTE

then map "nCK_PCT" (assuming that CK_TOT and TOT_VOTE are numeric - some 
software makes all fields in say shapefiles into strings)? If they aren't 
numeric (see below), coerce them using as.numeric() first.

You can check the way in which the data are represented by using the str() 
command, here

str(as(tx3_sp, "data.frame"))

will show the representation of your variables (str(tx3_sp) would show the 
geometries too, which you don't need here).

Roger