Skip to content

Commit

Permalink
Merge pull request #25 from SESjo/master
Browse files Browse the repository at this point in the history
unlist tmp to match dist2land's output with Windows
  • Loading branch information
MikkoVihtakari authored Jun 23, 2023
2 parents 52ebb8a + 5e044ea commit 884a48f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/dist2land.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ dist2land <- function(data, lon = NULL, lat = NULL, shapefile = NULL, proj.in =
cl <- parallel::makeCluster(cores, rscript_args = c("--no-init-file", "--no-site-file", "--no-environ"))
out <- parallel::parLapply(cl, 1:length(x), function(i) suppressWarnings(rgeos::gDistance(x[i], land)/1000))
parallel::stopCluster(cl)
tmp <- unlist(out)
}
else {
tmp <- unlist(parallel::mclapply(1:length(x), function(i) {
Expand Down

0 comments on commit 884a48f

Please sign in to comment.