Skip to contents

collect() attempts to retrieve the result of a query from the selected API.


# S3 method for data_request
collect(x, ..., wait = TRUE, file = NULL)

# S3 method for metadata_request
collect(x, ...)

# S3 method for files_request
collect(x, ...)

# S3 method for query
collect(x, ..., wait = TRUE, file = NULL)

# S3 method for computed_query
collect(x, ..., wait = TRUE, file = NULL)



An object of class data_request, metadata_request or files_request (from galah_call()); or an oject of class query_set or query (from collapse() or compute())


Arguments passed on to other methods


logical; should galah wait for a response? Defaults to FALSE. Only applies for type = "occurrences" or "species".


(Optional) file name. If not given, will be set to data with date and time added. The file path (directory) is always given by galah_config()$package$directory.


In most cases, collect() returns a tibble containing requested data. Where the requested data are not yet ready (i.e. for occurrences when wait is set to FALSE), this function returns an object of class query

that can be used to recheck the download at a later time.