Skip to contents

The function collects spectral data from a sample in a UNIFI Analysis. First, asynchronous queries are performed for each sample. Then, the data is deserialized by the function deserialize_data(). The S3 object containing the spectral data is adapted into a dataframe by the function outputlist_to_df().

Usage

collect_one_sample_data(
  sample_id,
  connection_params = NULL,
  num_spectras = NULL
)

Arguments

sample_id

The id of the sample to be collected

connection_params

OPTIONAL: Connection parameters object created by the create_connection_params function. If not provided, the get_connection_params will look for such object in the global environment

num_spectras

OPTIONAL Number of spectras to be downloaded (OPTIONAL, only if whole sample data not needed, e.g. for testing purposes)

Value

A sample_dataset object, containing the sample data, sample metadata and spectrum metadata datatables.

See also

save_one_sample_data to save collected data from the R environment to Parquet or HDF5 files, and convert_one_sample_data to both collect data and saving to files.