get_separate_frames: Get frames as separate data frames.

View source: R/opentimsr.R

get_separate_framesR Documentation

Get frames as separate data frames.

Description

Like query, but returns one data frame per frame instead of one table with the peaks of all frames. Frames are decoded in parallel (see opentims_set_threads). A frame requested more than once is returned once.

Usage

get_separate_frames(opentims, frames, columns = all_columns)

Arguments

opentims

Instance of OpenTIMS.

frames

Vector of frame numbers to extract.

columns

Vector of columns to extract. Defaults to all columns.

Value

A named list of data.frames, one per distinct frame, in order of first request and named by frame number. Each data.frame has the requested columns, with one row per peak, as returned by query.

Examples

path.d = system.file("extdata", "test.d", package = "opentimsr")
setup_opensource()
D = OpenTIMS(path.d)
frames = get_separate_frames(D, c(1, 2))
names(frames)
head(frames[["2"]])
get_separate_frames(D, 1, columns=c('scan','intensity')) # only 'scan' and 'intensity'
CloseTIMS(D)

opentimsr documentation built on Nov. 5, 2026, 1:08 a.m.