f_scale: Rescale

Description Usage Arguments Value Author(s) References Examples

View source: R/Functions_SystemicR.R

Description

This function normalizes data to 0-1 range. Specifically, this function computes linearly rescaled values from a vector of numeric values.

Usage

1
f_scale(v_time_series)

Arguments

v_time_series

Vector of numeric values

Value

A vector of numeric normalized values

Author(s)

Jean-Baptiste Hasse

References

Hasse, Jean-Baptiste. "Systemic Risk: a Network Approach". AMSE Working Paper (2020)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Scale the entries of a vector to the interval [0,1]

# NOT RUN {


  # Generate data
  v_data <- numeric(10)
  v_data <- c(1, 5, 3, 2, 15, 12, 9, 11, 7, 13)

  # Rescale data
  v_rescaled_data <- numeric(10)
  v_rescaled_data <- f_scale(v_data)

  # print rescaled data
  print(v_rescaled_data)


# }

SystemicR documentation built on July 1, 2020, 10:30 p.m.

Related to f_scale in SystemicR...