gM | R Documentation |
gMatrix instantiator
gM(
gr = NULL,
dat = NULL,
outer = NULL,
field = NULL,
full = FALSE,
fill = 0,
agg.fun = sum,
na.rm = TRUE,
lower.tri = FALSE
)
gr |
GRanges around which to build a gMatrix or gPair object to sum |
dat |
data.table of $i and $j indexing gr and field $value OR a vector valued expression involving terms i and j that will be applied to expand.grid |
outer |
character scalar field of gr that will be used to generate an "outer product" of gr with itself, which given vector x for numerics will make each gmatrix entry equal to x_i*x_j and for character vector or factor fields will make each vector equal to x_i == x_j |
field |
if gr is a gPair then field can be a character that specifies a gPair metadata numeric or integer metadata field that will be used as weights to sum the gPair objects |
full |
logical flag whether to explicitly "fill" missing entries in provided data.table (default = FALSE) |
fill |
value with which to fill missing values (default 0) |
agg.fun |
default function with which to aggregate values, this function should take a vector and na.rm = TRUE and return a scalar |
na.rm |
default na.rm argument to agg.fun |
A new gMatrix object
Marcin Imielinski
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.