
Retrieve Sample Information from UNIFI API with a sample id
Source:R/sample_infos.R
get_sample_infos.Rd
This function retrieves sample metadata and spectrum information from the UNIFI API for a specified sample result using the provided connection parameters. It extracts detailed spectrum information associated with the given sample result identifier. The function returns two dataframes containing the sample information and spectrum informationn, and two formatted JSON strings of the same data.
Arguments
- sample_id
The identifier of the sample result for which spectrum information is to be retrieved.
- connection_params
OPTIONAL: Connection parameters object created by the
create_connection_params
function. If not provided, theget_connection_params
will look for such object in the global environment
Value
A sample_infos
object, consisting of a list containing two elements: a dataframe with detailed sample information from the UNIFI API, and a formatted JSON string of the sample information.
Example usage: con_params <- create_connection_params() results <- get_sample_infos(sample_result_id, con_params)