Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ Imports:
terra,
randomForest,
quantregForest,
plyr
plyr,
snow
Depends: R (>= 3.2.0)
License: GPL-3
Encoding: UTF-8
Expand Down
6 changes: 3 additions & 3 deletions R/popRF.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 2 additions & 4 deletions R/utility_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down