Normalize and scale data per row
rowNormScale(
x,
from = 0,
to = 1,
naValue = NA,
low = NULL,
high = NULL,
singletMethod = "min",
col_range = NULL,
...
)
arguments passed to
jamba::normScale()
. Note that the default low,high
values
use the column range defined by col_range
.
numeric value or NULL
, passed to jamba::normScale()
for each row in x
. When low
is NULL
, it uses the
minimum value in col_range
for each row.
numeric value or NULL
, passed to jamba::normScale()
for each row in x
. When high
is NULL
, it uses the
maximum value in col_range
for each row.
integer vector referring to column numbers in
the input x
matrix to use in jamba::normScale()
. When
col_range
is NULL
, it uses all columns in x
.
additional arguments are passed to jamba::normScale()
.
This function essentially calls jamba::normScale()
on each row of a numeric matrix. By default, it scales
values to a fixed numeric range from 0 to 1, where
the minimum value is set to 0 and the maximum value is
set to 1. It is much more configurable, see jamba::normScale()
help docs.
Other jam utility functions:
cardinality()
,
color_complement()
,
convert_PD_df_to_SE()
,
convert_imputed_assays_to_na()
,
curate_se_colData()
,
curate_to_df_by_pattern()
,
design2layout()
,
get_numeric_transform()
,
handle_df_args()
,
merge_proteomics_se()
m <- matrix(1:9, ncol=3);
m;
#> [,1] [,2] [,3]
#> [1,] 1 4 7
#> [2,] 2 5 8
#> [3,] 3 6 9
rowNormScale(m);
#> [,1] [,2] [,3]
#> [1,] 0 0.5 1
#> [2,] 0 0.5 1
#> [3,] 0 0.5 1
rowNormScale(m, from=0, to=10);
#> [,1] [,2] [,3]
#> [1,] 0 5 10
#> [2,] 0 5 10
#> [3,] 0 5 10