MassDataFrame-class {Cardinal} | R Documentation |
An MassDataFrame
is an extension of the XDataFrame
class with a special slot-column for observed mass-to-charge ratios.
MassDataFrame(mz, ..., row.names = NULL, check.names = TRUE)
mz |
A |
... |
Named arguments that will become columns of the object. |
row.names |
Row names to be assigned to the object; no row names are assigned if this is |
check.names |
Should the column names be checked for syntactic validity? |
MassDataFrame
is designed for mass spectrometry data. It includes a slot-column for the mass-to-charge ratio. It is intended to annotate either a single mass spectrum or an experiment where each mass spectrum share the same mass-to-charge ratios. The m/z values can be get and set by the mz(object)
accessor, and are assumed to be unique and sorted in increasing order.
mz(object)
, mz(object) <- value
:Get or set the mass-to-charge ratio slot-column.
resolution(object)
, resolution(object) <- value
:Get or set the estimated mass resolution of the mass-to-charge ratios. Typically, this should not be set manually.
isCentroided(object)
:Guess whether the data are centroided or not, based on the m/z values.
as.list(x, ..., slots = TRUE)
:Coerce the object to a list
, where the slot-columns are included by default. Use slots=FALSE
to exclude the slot-columns.
Kylie A. Bemis
## create an MassDataFrame object mz <- mz(from=200, to=220, by=200) values <- runif(length(mz)) fdata <- MassDataFrame(mz=mz, values=values) ## check the mass-to-charge ratio properties head(mz(fdata)) resolution(fdata)