Skip to content
Snippets Groups Projects
Commit dcf0e3a4 authored by Maria Voigt's avatar Maria Voigt
Browse files

adding comments and doubts to abundance-pred

parent 02cab083
No related branches found
No related tags found
No related merge requests found
...@@ -81,6 +81,7 @@ predictor_names <- predictor_names[!grepl("year[:punct:]*", predictor_names)] ...@@ -81,6 +81,7 @@ predictor_names <- predictor_names[!grepl("year[:punct:]*", predictor_names)]
predictor_names <- c("year", predictor_names) predictor_names <- c("year", predictor_names)
# predictors for year on grid # predictors for year on grid
print(paste("these are predictor names: ", predictor_names))
predictors_path <- path.to.current(indir_predictors, paste0("predictors_abundance_", predictors_path <- path.to.current(indir_predictors, paste0("predictors_abundance_",
year_to_predict),"rds") year_to_predict),"rds")
print(paste("this is predictors path", predictors_path)) print(paste("this is predictors path", predictors_path))
...@@ -131,7 +132,7 @@ t_predictor_estimates <- t( predictor_estimates[i, ]) ...@@ -131,7 +132,7 @@ t_predictor_estimates <- t( predictor_estimates[i, ])
print(paste(Sys.time(), "2. finished dopar loop")) print(paste(Sys.time(), "2. finished dopar loop"))
# is this correct -> ????
pred_per_cell <- as.data.frame(cbind(predictors$id, pred_per_cell)) pred_per_cell <- as.data.frame(cbind(predictors$id, pred_per_cell))
names(pred_per_cell) <- c("id", "abundance_pred") names(pred_per_cell) <- c("id", "abundance_pred")
...@@ -143,7 +144,7 @@ print(paste(Sys.time(), "sum predicted for ", year_to_predict, ...@@ -143,7 +144,7 @@ print(paste(Sys.time(), "sum predicted for ", year_to_predict,
sum(pred_per_cell$abundance_pred))) sum(pred_per_cell$abundance_pred)))
print(paste(Sys.time(), "range predicted for ", year_to_predict, print(paste(Sys.time(), "range predicted for ", year_to_predict,
range(pred_per_cell$abundance_pred))) range(pred_per_cell$abundance_pred)))
# has to be between 0 and 1
save.image(file.path(outdir, paste0("abundance_pred_image_", year_to_predict, "_", save.image(file.path(outdir, paste0("abundance_pred_image_", year_to_predict, "_",
Sys.Date(), ".RData"))) Sys.Date(), ".RData")))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment