Error in auk_filter

#Now that the filters have been specified, process the two data tables to be used through the
# same filters.  The output is still not loaded into R, but rather exists as a couple of 
# text files.
filtered <- auk_filter(filters, file = output_bird, file_sampling = output_sampling, overwrite = T)

#Zero-fill (i.e. create presence-absence dasta) from the two filtered data tables, and 
# finally load the result as a data object into R.
WestIndWhistDuck_PR_zf_filtered <- auk_zerofill(filtered, collapse = T)

error:

Error in auk_filter(filters, file = output_bird, file_sampling = output_sampling,  : 
  object 'filters' not found

A reproducible example, called a reprex will help attract more answers.

Looking at the documentation auk_filter's signature is

   auk_filter(x, file, file_sampling, keep, drop, awk_file,
      sep = "\t", filter_sampling = TRUE, execute = TRUE,
      overwrite = FALSE, ...)

where x is

auk_ebd or auk_sampling object; reference to file created by auk_ebd() or auk_sampling().

so filters would have to be defined, similarly to

sample <- system.file("extdata/ebd-sample.txt", package = "auk")
    auk_ebd(f)

You should probably set EBD_PATH environment variable to avoid having to give a full path name.

If you are looking for a specific species,

 filter <- auk_ebd(f) %>%
      auk_species(species = c("Canada Jay", "Blue Jay")) %>%
      auk_country(country = c("US", "Canada")) %>%
      auk_bbox(bbox = c(-100, 37, -80, 52)) %>%
      auk_date(date = c("2012-01-01", "2012-12-31")) %>%
      auk_time(start_time = c("06:00", "09:00")) %>%
      auk_duration(duration = c(0, 60)) %>%
      auk_complete()

See auk_get_awk_path on page 17 of the manual for the rest of the example

Thank you very much!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.