[R-sig-Geo] subs and the name of column
alfreale
alfreale74 at gmail.com
Tue Sep 13 11:51:49 CEST 2011
Hi,
I've tried with the names of the column but don't work:
> data_6SV_cluster
cluster intercept coefficient
1 1 -0.04436168 1.286019
2 2 -0.04415990 1.283883
3 3 -0.04414168 1.286019
4 4 -0.04375406 1.280874
5 5 -0.04400495 1.281942
6 6 -0.04390901 1.282816
> as.matrix(raster_cluster)
[,1] [,2] [,3]
[1,] 1 2 3
[2,] 4 5 6
> colnames(data_6SV_cluster)
[1] "cluster" "intercept" "coefficient"
> subs(raster_cluster,data_6SV_cluster,which="coefficient")
Error in `[.data.frame`(y, , c(by, which)) : undefined columns selected
> subs(raster_cluster,data_6SV_cluster,which=3)
class : RasterLayer
dimensions : 2, 3, 6 (nrow, ncol, ncell)
resolution : 0.2678571, 0.2678571 (x, y)
extent : 99.48661, 100.2902, 2.191965, 2.727679 (xmin, xmax, ymin,
ymax)
coord. ref. : +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
+towgs84=0,0,0
values : in memory
min value : 1.280874
max value : 1.286019
Thanks,
Alfredo
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/subs-and-the-name-of-column-tp6594997p6786840.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list