resc.val

0th

Percentile

R function to rescale the values of a dataset between a minimum and a maximum set by the user

The function allows to rescale the values of a dataset between a minimum and a maximum that are specified by the user. In doing that, it allows to preserve the shape of the distribution of the original data.

Keywords
resc.val
Usage
resc.val(x, min.v = 0, max.v = 100)
Arguments
x

Vector containing the values to be rescaled.

min.v

Minimum value of the rescaled dataset (0 by default).

max.v

Maximum value of the rescaled dataset (100 by default).

Details

The function produces two density charts representing the distribution of the original and of the rescaled dataset. It also returns a dataframe storing the original and rescaled values.

Aliases
  • resc.val
Examples
# NOT RUN {
#generate a random dataset of size 30, normally distributed with mean 1000 and
#standard deviation 10
dataset <- rnorm(30, 1000,10)

#rescale the dataset to be constrained between 10 and 100
resc.val(dataset, min.v=10, max.v=100)

# }
Documentation reproduced from package GmAMisc, version 1.0.0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.