sub-.WideSomaLogicData: Indexing for WideSomaLogicData objects

Description Usage Arguments Value See Also Examples

Description

Wrapper to [.data.table, ensuring that the SequenceData, Metadata and Checksum attributes are preserved.

Usage

1
2
## S3 method for class 'WideSomaLogicData'
x[...]

Arguments

x

A WideSomaLogicData object.

...

Passed to [.data.table.

Value

If the indexing returns a A WideSomaLogicData object.

See Also

data.table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
soma_file <- extractSampleData()
wide_soma_data <- readAdat(soma_file)

# Indexing returns a data.table, so the WideSomaLogicClass is preserved
wide_soma_data[1:5, list(`SeqId.3896-5_2`)]
# Indexing simplifies to a numeric vector, so the class is lost
wide_soma_data[1:5, `SeqId.3896-5_2`]

# Ignore the intensity columns (as per getSampleData)
j <- !colnamesStartWithSeqId(wide_soma_data)
wide_soma_data[1:5, j, with = FALSE]
unlink(soma_file)

graumannlab/readat documentation built on May 16, 2020, 10:15 p.m.