Learn R Programming

hyper.gam (version 0.2.2)

scale_do: Alternative scale Methods

Description

Alternative scale using median, IQR and mad.

Usage

scale_do(x, center, scale)

Value

Function scale_do() returns a numeric

vector of the same length as x.

Arguments

x

numeric vector

center

function

scale

function

Details

Function scale_do() performs scaling according to user-specified definition of center and scale.

Examples

Run this code
set.seed(1315); x = rnorm(20)
x |> scale_do(center = median, scale = mad) 
x |> scale_do(center = median, scale = IQR) 

Run the code above in your browser using DataLab