View source: R/sequence_characteristics.R
scale_by_sum | R Documentation |
Scale values of a vector so that the result sums to 1
scale_by_sum(x)
x |
A numeric vector |
scale_to_reference_fun
x <- c(1:6, 8)
# Equivalent but more efficient than `scale_to_reference_fun`
scale_by_sum(x)
scale_to_reference_fun(x, 1, fun = sum)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.