diff --git a/DESCRIPTION b/DESCRIPTION index 69b8e24..3b9b881 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -67,7 +67,8 @@ Imports: terra, randomForest, quantregForest, - plyr + plyr, + snow Depends: R (>= 3.2.0) License: GPL-3 Encoding: UTF-8 diff --git a/R/popRF.R b/R/popRF.R index fb68562..359f507 100644 --- a/R/popRF.R +++ b/R/popRF.R @@ -283,7 +283,7 @@ popRF <- function(pop, verbose = verbose, log = log) log_info("MSG", - paste0("popRF will use maximum avalible cores on the PC which is ", + paste0("popRF will use maximum available cores on the PC which is ", cores), verbose = verbose, log = log) @@ -362,7 +362,7 @@ popRF <- function(pop, - #get blokcs for parallel calculation of zonal stats + #get blocks for parallel calculation of zonal stats # blocks_zs <- get_blocks_size(raster(covariates[[1]]$mastergrid$dataset_path), # cores, @@ -994,7 +994,7 @@ popRF <- function(pop, # nt=1, # verbose = verbose, ...) - #get blokcs for parallel calculation of zonal stats + # get blocks for parallel calculation of zonal stats blocks <- get_blocks_size(census_mask, cores, diff --git a/R/utility_functions.R b/R/utility_functions.R index 84f8396..9e8bbad 100644 --- a/R/utility_functions.R +++ b/R/utility_functions.R @@ -80,13 +80,11 @@ log_info <- function(prank, create_dir <- function(x, verbose){ - x.covariates <- file.path(x, "covariates") - if(!file.exists( x.covariates )) { - msg <- paste0("Log :: Creating directory ", x.covariates,".") + msg <- paste0("Log :: Creating directory ", x, ".") - dir.create(x.covariates, + dir.create(x, recursive = TRUE, showWarnings = FALSE)