...
 
Commits (2)
......@@ -360,17 +360,16 @@ ABApredict <- function(modell, map.metrics, strata=NULL)
if (is.null(strata))
{
map.metrics$strata <- 1
map.metrics$strata <- as.factor(map.metrics$strata)
levels(map.metrics$strata) <- data.frame(ID=1, propriete="1")
map.metrics$strata@data@attributes[[1]] <- data.frame(ID=1, propriete="1")
}
#
dummy <- list()
# loop on strata
for (i in 1:nrow(levels(map.metrics[["strata"]])[[1]]))
for (i in 1:nrow(map.metrics[["strata"]]@data@attributes[[1]]))
{
# extract stratum
stratum <- as.character(levels(map.metrics[["strata"]])[[1]][i, 2])
stratum.ID <- levels(map.metrics[["strata"]])[[1]][i, "ID"]
stratum <- as.character(map.metrics[["strata"]]@data@attributes[[1]][i, 2])
stratum.ID <- map.metrics[["strata"]]@data@attributes[[1]][i, "ID"]
# predict on all cells
if (modell$stats[stratum,"transform"] == "boxcox") # case of Box-Cox transform
{
......