Sends a request for information to a server. This is useful for requests that run a server-side process, as it separates the submission of the request from its retrieval.
Within galah, compute() is generally hidden as it is one part of the overall
process to complete a data_request,
metadata_request or file_request. However, calling
compute() at the
end of a galah_call() sends a request to be completed server-side
(i.e., outside of R), and the result can be returned in R by
calling collect()
at a later time. This can be preferable to calling atlas_occurrences(), which
prevents execution of new code until the server-side process is complete.
# S3 method for data_request
compute(x, ...)# S3 method for metadata_request
compute(x, ...)
# S3 method for files_request
compute(x, ...)
# S3 method for prequery
compute(x, ...)
# S3 method for query
compute(x, ...)
# S3 method for query_set
compute(x, ...)
An object of class computed_query, which is identical to class
query except for occurrence data, where it also contains information on the
status of the request.
An object of class data_request, metadata_request or
files_request (i.e. constructed using a pipe) or query
(i.e. constructed by collapse())
Arguments passed on to other methods
galah uses an object-based pipeline to convert piped requests into
valid queries, and to enact those queries with the specified organisation.
Typically, requests open with galah_call() - though request_metadata()
and request_files() are also valid - and end with
collect(). Under the hood,
the sequence of functions is as follows:
capture() → compound() →
collapse() →
compute() →
collect()
compute() sends a query to a server,
which, once completed, can be retrieved using
collect().
To open a piped query, see galah_call(). For alternative
operations on _request objects, see capture(), compound(),
collapse(),
collect().