Displaying 1 result from an estimated 1 matches for "makedtbl".
Did you mean:
makedll
2012 Jun 27
1
how to convert list of matrix (raster:extract o/p) to data table with additional colums (polygon Id, class)
....74 2 AG
13958 0.22 2 AG
13959 0.16 2 AG
13960 0.80 2 AG
13987 0.95 2 AG
13988 0.50 2 AG
13990 0.30 2 AG
13988 0.50 3 BU
13990 0.30 3 BU
To do this I have down following
makeDtbl<- function(x,class,id='NA') {
if(!is.null(x))
data.table(x,y,z)
}
inputClass<-as.character(inputShape at data$CLASS)
id<-as.character(inputShape at data$ID)
kc<-mapply(makeDtbl,ex,inputClass,id)
I got kc as
[,1] [,...