Displaying 2 results from an estimated 2 matches for "a3a3a3".
Did you mean:
3a3a
2011 Jan 31
1
str() on raster objects fails for certain dimensions
...etting as a vector, which str() relies on, "[.raster"() still
returns a matrix-like object, e.g.
> img <- as.raster(1:25, max=25, nrow=5, ncol=5);
> img[1:2]
[,1] [,2] [,3] [,4] [,5]
[1,] "#0A0A0A" "#3D3D3D" "#707070" "#A3A3A3" "#D6D6D6"
[2,] "#141414" "#474747" "#7A7A7A" "#ADADAD" "#E0E0E0"
compare with:
> as.matrix(img)[1:2]
[1] "#0A0A0A" "#3D3D3D"
The easy but incomplete fix is to do:
str.raster <- function(object, ...) {...
2000 Feb 29
0
mapping of colornames into hsv: half way done
...t;gray58", "#949494",
"gray59", "#969696",
"gray60", "#999999",
"gray61", "#9C9C9C",
"gray62", "#9E9E9E",
"gray63", "#A1A1A1",
"gray64", "#A3A3A3",
"gray65", "#A6A6A6",
"gray66", "#A8A8A8",
"gray67", "#ABABAB",
"gray68", "#ADADAD",
"gray69", "#B0B0B0",
"gray70", "#B3B3B3",
"gray71...