rescale_values {moanin} | R Documentation |
Rescales rows of data to be between 0 and 1
## S4 method for signature 'Moanin' rescale_values(object, data = NULL, use_group = FALSE) ## S4 method for signature ''NULL'' rescale_values(object, data) ## S4 method for signature 'missing' rescale_values(object, ...)
object |
a object of class Moanin, only needed if choose to rescale by grouping variable in the moanin object. If NULL, then data will be rescaled jointly across all observations. |
data |
The matrix to rescale by row. If NULL, and |
use_group |
If true, then the data will be rescaled such that, for each
row, all values associated to each group (defined by grouping variable of
|
... |
arguments passed to the matrix or Moanin method. |
If the user set log_transform=TRUE
in the creation of the
Moanin
object, the data will be log transformed before rescaling
rescaled y, such that for each row, the values are comprised between
0 and 1. Note that if use_group=TRUE
and object
is not NULL,
the values associated to the columns of unique values of the grouping
variable of object
will be rescaled separately.
data(exampleData) moanin <- create_moanin_model(data=testData, meta=testMeta) # Can rescale data in Moanin object allData <- rescale_values(moanin) # Or provide different data and/or rescale within grouping variable smallData <- rescale_values(moanin, data=testData[1:10,], use_group=TRUE)