Dear List,
I'm trying to perform some arithmetic operation with layers of a raster
object. What I'm trying is
>require(raster)
>r<- raster(nrows=2, ncols=2)
>r[]<-1:ncell(r)
>s<-stack(r,r)
>names(s)<-c("a","b")
# now I want to add the layers of the raster "r" using their corresponding
names,i.e.
1 or 2 or 0. and the product r3
> will be 1 or 2 or 0
>
> On Oct 17, 2012 11:55 AM, "aniruddha ghosh" wrote:
>>
>> Dear List,
>> I have two raster layers (r1 and r2) and the cells have values ranging 1 to
>> 10. I want to create a new raster layer from thes
Dear List,
I have two raster layers (r1 and r2) and the cells have values ranging 1 to
10. I want to create a new raster layer from these two with different
conditions like:
1) if r1==1 and r2==1, then r3 should be 1
2) if r1==1 and r2==2, then r3 should be 2
else 0 etc
With the following example:
neLength = 5,
> trControl = trainControl(method = "repeatedcv", repeats = 5, verboseIter =
> FALSE), metric = "Kappa")
>
>
>> logo[2:10,] <- NA
>> r1 <- predict(logo, rfFit)
>>
>> logo[2:10,] <- Inf
>> r2 <- predict(logo, rfF
Dear List,
I'm trying to classify a multiband raster with point shapefiles as
training data. I used the following:
vec<-readOGR(".","training")
raster<-stack("test.tif") #it contains around 10 pixels and 240 layers
outImage<-"classified.tif"
#then extract the training values
train<-extract(ra
attribute to this .dbf file?
I'm using the .dbf file beacuse it is allowing me to apply diiferent
methods from different packages for prediction which I couldn't apply
to the .shp files due to my limited knowledge in using R!
Thanks,
Aniruddha Ghosh
___
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo