Learn R Programming

npsf (version 0.8.0)

rescale: 'rescale' method for class 'npsf'

Description

rescales a vector.

Usage

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.

See Also

sf, primes, and halton.

Examples

Run this code
# NOT RUN {
  require( npsf )
  
  # obtain first 30 prime numbers
  set.seed(8265897)
  t1 <- runif(10, min = 1, max = 2)
  summary(t1)
  summary(rescale(t1, 0, 10))
  
# }

Run the code above in your browser using DataLab