Commit ad49016a authored by Romulo Pereira Goncalves's avatar Romulo Pereira Goncalves
Browse files

Merge branch 'carsten_optimization' into 'master'

Revert code optimization which was leading to incorrect results.

See merge request !12
parents c2f0e202 903261da
......@@ -58,11 +58,11 @@ model_opt_r <- function(k,
}
pbt <- spatialEco::point.in.poly(pbt, area)[, 1:n_channel]
#f <- which(is.na(pbt@data[1]))
#if (length(f) != 0) {
# pbt <- pbt[-f,]
#}
pbt@data <- pbt@data[complete.cases(pbt@data[1]), ]
f <- which(is.na(pbt@data[1]))
if (length(f) != 0) {
pbt <- pbt[-f,]
}
set.seed(seed2[k])
classes <-
......
......@@ -73,7 +73,7 @@ shp<-readOGR(paste(dataPath,"Example_Reference_Points.shp", sep=""))
proj4string(shp)<- "+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"
shp<-spTransform(shp,CRS( "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"))
ref<-as.data.frame(extract(a1,shp))
-
##1.c.1##
p <- as(extent(a1), 'SpatialPolygons')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment