| convert | R Documentation |
Methods for turning R objects to class annmatrix and vice versa.
as.annmatrix(x)
## Default S3 method:
as.annmatrix(x)
## S3 method for class 'matrix'
as.annmatrix(x)
## S3 method for class 'annmatrix'
as.matrix(x, ...)
is.annmatrix(x)
x |
an R object. |
... |
additional arguments to be passed to or from methods. |
as.annmatrix will attempt to convert an object to annmatrix.
as.matrix will turn an annmatrix object into a regular matrix.
is.annmatrix checks if the object is an instance of annmatrix.
is.annmatrix returns TRUE if object is of class 'annmatrix' and FALSE otherwise.
as.annmatrix methods return an object of class 'annmatrix'.
as.matrix returns a regular matrix.
Karolis Koncevičius
# construct annmatrix object
x <- matrix(rnorm(20*10), 20, 10)
X <- as.annmatrix(x)
X$group <- rep(c("case", "control"), each = 5)
X$gender <- sample(c("M", "F"), 10, replace = TRUE)
X@chr <- sample(c("chr1", "chr2"), 20, replace = TRUE)
X@pos <- runif(20, 0, 1000000)
is.matrix(x)
is.matrix(X)
is.annmatrix(x)
is.annmatrix(X)
as.matrix(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.