query_slice: Query for raw data.

View source: R/opentimsr.R

query_sliceR Documentation

Query for raw data.

Description

Get the raw data from Bruker's 'tdf_bin' format. Defaults to both raw data ('frame','scan','tof','intensity') and its tranformations into physical units ('mz','inv_ion_mobility','retention_time').

Usage

query_slice(opentims, from = NULL, to = NULL, by = 1, columns = all_columns)

Arguments

opentims

Instance of OpenTIMS.

from

First frame to extract.

to

Last frame to extract.

by

Every by-th frame gets extracted (starting from the first one).

columns

Vector of columns to extract. Defaults to all columns.

Details

We assume 'from' <= 'to'.

Value

data.frame with selected columns.

Examples

path.d = system.file("extdata", "test.d", package = "opentimsr")
setup_opensource()
D = OpenTIMS(path.d)
query_slice(D, 1, 2)    # frames 1 to 2
query_slice(D, 1, 2, 2) # every second frame between 1 and 2
query_slice(D, 1, 2, columns=c('scan','intensity')) # only 'scan' and 'intensity'
CloseTIMS(D)

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