diff --git a/R/zoonHelpers.R b/R/zoonHelpers.R index 04304d8..c40de71 100644 --- a/R/zoonHelpers.R +++ b/R/zoonHelpers.R @@ -175,7 +175,7 @@ RunModels <- function(df, modelFunction, paras, workEnv){ # If external validation dataset exists, predict that;. if(0 %in% df$fold){ - pred <- ZoonPredict(modelFold, + pred <- ZoonPredict(m, newdata = df[df$fold == 0, 6:NCOL(df), drop = FALSE]) dfOut$predictions[df$fold == 0] <- pred diff --git a/inst/doc/Module_IO_for_devs.Rmd b/inst/doc/Module_IO_for_devs.Rmd index 53f0781..121353a 100644 --- a/inst/doc/Module_IO_for_devs.Rmd +++ b/inst/doc/Module_IO_for_devs.Rmd @@ -25,8 +25,8 @@ Out: df with longitude latitude value type fold out: raster layer or raster stack ### Process -in: list(df with value, type, fold, lon, lat + covs, covar raster) -out: list(df with value, type, fold, lon, lat + covs, covar raster) +in: list(df with value, type, fold, longitude, latitude + covs, covar raster) +out: list(df with value, type, fold, longitude, latitude + covs, covar raster) ### Model