Description Usage Arguments S3 METHODS References See Also Examples
Class slots:
A numeric vector of protein masses in daltons.
An integer vector of protein counts/abundance.
1 | proteins(masses, counts)
|
masses |
A positive numeric vector of protein masses in daltons, whose elements should be unique. |
counts |
A positive integer vector of protein counts/abundance,
which should have the same length as |
Arith group generic functions.
Usage: FUN(x, y) or x op y
a member of the Arith
group generic functions,
which include +
, -
, *
,^,
%%, %/%, and /
.
a proteins
object or a numeric vector.
a proteins
object or an integer vector.
If both x
and y
are objects of proteins
,
only +
and -
apply as mixing two protein samples and
taking part of a protein sample away, respectively.
If x
is a numeric and y
is an objects of proteins
,
the masses
of y
will be modified according to the operation.
If x
is an objects of proteins
and y
is an integer,
the counts
of x
will be modified according to the operation.
Compare group generic functions.
Usage: FUN(x, y)
a member of the Compare
group generic functions,
which include ==, >, <, !=, <=,
>=, and compare.
a proteins
object or a numeric vector.
a proteins
object or a numeric vector.
If both x
and y
are objects of proteins
,
only == and != apply .
If x
is a numeric and y
is an objects of proteins
,
the masses
of y
will be compared according to the operation.
If x
is an objects of proteins
and y
is a numeric,
the counts
of x
will be compared according to the operation.
Math, Math2, Logic group generic functions
are not defined for class proteins
.
Summary group generic functions.
Usage: FUN(x)
a member of the Summary
group generic functions,
which include max
, min
, range
, prod
, sum
,
any
, and all
.
a proteins
object.
Extract parts of a proteins
object.
Usage: x[i]
a proteins
object.
a subscript expression identifying the proteins to extract.
Replace the counts of parts of a proteins
object.
Usage: x[i]<-value
a proteins
object.
a subscript expression identifying the protein counts to replace.
a proteins
object or an integer vector.
Display a proteins
object.
Usage: show(object) or object
a proteins
object.
Make all functions that naturally relate to points in the plane
work with objects of class proteins
,
including plot
, lines
, points
, and etc.
This generic function is not meant to be called directly.
Usage: xyCall(x, y, FUN, ..., xexpr, yexpr)
a proteins
object.
missing.
a function to be called that have arguments x
, y
, ....
the S object representing the x
argument to FUN
unevaluated.
the S object representing the y
argument to FUN
unevaluated.
Coombes, K.R., Koomen, J.M., Baggerly, K.A., Morris, J.S., Kobayashi, R., “Understanding the characteristics of mass spectrometry data through the use of simulation," Cancer Informatics, 2005(1):41–52, 2005.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## generate two protein samples
sam1 <- proteins(masses=c(1, 95, 190), counts=as.integer(c(500, 3000, 10000)))
sam2 <- proteins(masses=10000+200*(0:3), counts=as.integer(c(12000, 4000, 2000, 1000)))
## print the synopsis of the protein samples
sam1
sam2
## mix the protein samples
sam <- sam1 + sam2
## visualize the protein mixture
plot(sam, type="h")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.