View source: R/dplyr-compute.R
| compute.data_request | R Documentation |
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 class 'data_request'
compute(x, ...)
## S3 method for class 'metadata_request'
compute(x, ...)
## S3 method for class 'files_request'
compute(x, ...)
## S3 method for class 'prequery'
compute(x, ...)
## S3 method for class 'query'
compute(x, ...)
## S3 method for class 'query_set'
compute(x, ...)
x |
An object of class |
... |
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().
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.
To open a piped query, see galah_call(). For alternative
operations on _request objects, see capture(), compound(),
collapse(),
collect().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.