Description Usage Arguments Value
View source: R/normalize_rows.R
Pre-compute some other vector by which to normalize (like from a different but identically dimensioned matrix), and use it to normalize the rows of the input matrix dd.
1 | row_norm_to_vector(dd, normVector, rowInds = NULL, colInds = NULL)
|
dd |
input data frame to normalize |
normVector |
This is a vector that will properly normalize the rows of this data frame, BEFORE any non-processed rows are removed from it. (i.e. it has to have exactly the same dimension as the pre-processed data frame it's going to normalize. The length of the columns (dim(...)[[1]])) |
rowInds |
A span of row indices over which to operate. These should be the data rows, and this is just so that you can have other ignored rows be in there. This can be NULL, in which case all rows are normalized, or it can be a vector of integer indices, or it can be a function that gets called with dd and which returns a vector of ints (see function 'span' in this package) |
colInds |
A span of column indices over which to operate. These should be the data columns, and this is just so that you can have other ignored columns be in there. This can be NULL, in which case all columns are normalized, or it can be a vector of integer indices, or it can be a function that gets called with dd and which returns a vector of ints (see function 'span' in this package) |
return the input data frame, but with the specified data rows normalized by the input column vector.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.