Learn R Programming

nemBM (version 1.00.01)

normalizeRsphere: Normalize values on a sphere

Description

Normalizes values of a vector such that the sum of squared elements equal to \(r^2\).

Usage

normalizeRsphere(x, r = 1)

Value

It returns a data frame with normalized values.

Arguments

x

A vector or a matrix with values to be normalized.

r

The diameter of a sphere, default 1.

Author

Marjan Cugmas

Examples

Run this code
normalizeRsphere(x = c(1, 0.5, 0.4))

Run the code above in your browser using DataLab