Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestions: adding the progress bar of the function occ #227

Open
Otoliths opened this issue Jul 13, 2020 · 1 comment
Open

suggestions: adding the progress bar of the function occ #227

Otoliths opened this issue Jul 13, 2020 · 1 comment

Comments

@Otoliths
Copy link

Otoliths commented Jul 13, 2020

suggestions: Tracking mclapply with progress bar, replace the all lapply in function occ with pbmclapply

occs <- function (query = NULL, from = "gbif", limit = 500, start = NULL, 
          page = NULL, geometry = NULL, has_coords = NULL, ids = NULL, 
          date = NULL, callopts = list(), gbifopts = list(), bisonopts = list(), 
          inatopts = list(), ebirdopts = list(), ecoengineopts = list(), 
          vertnetopts = list(), idigbioopts = list(), obisopts = list(), 
          alaopts = list(), throw_warnings = TRUE, mc.cores) 
{
 .....
      for (i in seq_along(query)) {
        tmpres <- pbmcapply::pbmclapply(geometry, mc.cores = mc.cores, function(b) {
          loopfun(z = b, y = limit, s = start, p = page, 
                  x = query[[i]], hc = has_coords, d = date, 
                  w = callopts)
        })
.....
@sckott
Copy link
Contributor

sckott commented Jul 13, 2020

thanks, i'll consider a progress bar, i wouldn't import a package for that, would just use base R, but will think about it. it's a bit more complicated than that because there are other paths where queries happen in the function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants