Displaying 2 results from an estimated 2 matches for "7a7a7a".
Did you mean:
77a7a
2011 Jan 31
1
str() on raster objects fails for certain dimensions
...rix-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, ...) {
str(as.matrix(object), ...);
}
Other suggestions?
> sessionInfo()
R version 2....
2000 Feb 29
0
mapping of colornames into hsv: half way done
...t;gray42", "#6B6B6B",
"gray43", "#6E6E6E",
"gray44", "#707070",
"gray45", "#737373",
"gray46", "#757575",
"gray47", "#787878",
"gray48", "#7A7A7A",
"gray49", "#7D7D7D",
"gray50", "#7F7F7F",
"gray51", "#828282",
"gray52", "#858585",
"gray53", "#878787",
"gray54", "#8A8A8A",
"gray55...