Learn R Programming

kebabs (version 1.2.3)

KernelMatrixAccessors: KernelMatrix Accessors

Description

KernelMatrix Accessors

Usage

"["(x, i)
"as.KernelMatrix"(x, center = FALSE)

Arguments

x
kernel matrix of class KernelMatrix
i
numeric vector with indicies or character with element names
center
when set to TRUE the matrix is centered. Default=FALSE

Value

see above

Accessor-like methods

x[i,]: return a KernelMatrix object that only contains the rows selected with the subsetting parameter i. This parameter can be a numeric vector with indices or a character vector which is matched against the names of x.
x[,j]: return a KernelMatrix object that only contains the columns selected with the subsetting parameter j. This parameter can be a numeric vector with indices or a character vector which is matched against the names of x.
x[i,j]: return a KernelMatrix object that only contains the rows selected with the subsetting parameter i and columns selected by j. Both parameters can be a numeric vector with indices or a character vector which is matched against the names of x.

Coercion methods

In the code snippets below, x is a kernel matrix.
as.KernelMatrix(x, center=FALSE): center the kernel matrix dependent on the center parameter and coerce it to class KernelMatrix .

References

http://www.bioinf.jku.at/software/kebabs J. Palme, S. Hochreiter, and U. Bodenhofer (2015) KeBABS: an R package for kernel-based analysis of biological sequences. Bioinformatics (accepted). DOI: 10.1093/bioinformatics/btv176.

Examples

Run this code
## create kernel object for normalized spectrum kernel
specK5 <- spectrumKernel(k=5)
## Not run: 
# ## load data
# data(TFBS)
# 
# km <- specK5(enhancerFB)
# km1to5 <- km[1:5,1:5]
# km1to5
# ## End(Not run)

Run the code above in your browser using DataLab