rescale: 'rescale' method for class 'npsf'

Description Usage Arguments Value Author(s) See Also Examples

View source: R/npsf-internal.R

Description

rescales a vector.

Usage

1
  rescale(x, lb = min(x), ub = max(x))

Arguments

x

a numeric vector.

lb

numeric. lower bound.

ub

numeric. upper bound.

Value

rescale returns rescaled vector.

Author(s)

Oleg Badunenko <oleg.badunenko@brunel.ac.uk>

See Also

sf, primes, and halton.

Examples

1
2
3
4
5
6
7
8
  require( npsf )
  
  # obtain first 30 prime numbers
  set.seed(8265897)
  t1 <- runif(10, min = 1, max = 2)
  summary(t1)
  summary(rescale(t1, 0, 10))
  

npsf documentation built on Nov. 23, 2020, 1:07 a.m.