powered by
Rescale a numeric variable to a new range.
change_scale(x, ...)# S3 method for numeric change_scale(x, to = c(0, 100), range = NULL, verbose = TRUE, ...)# S3 method for grouped_df change_scale( x, select = NULL, exclude = NULL, to = c(0, 100), range = NULL, ... )# S3 method for data.frame change_scale( x, select = NULL, exclude = NULL, to = c(0, 100), range = NULL, ... )
# S3 method for numeric change_scale(x, to = c(0, 100), range = NULL, verbose = TRUE, ...)
# S3 method for grouped_df change_scale( x, select = NULL, exclude = NULL, to = c(0, 100), range = NULL, ... )
# S3 method for data.frame change_scale( x, select = NULL, exclude = NULL, to = c(0, 100), range = NULL, ... )
Object.
Arguments passed to or from other methods.
New range of values of the data after rescaling.
Initial (old) range of values. If NULL, will take the range of data.
NULL
Toggle warnings and messages on or off.
Character vector of column names. If NULL (the default), all variables will be selected.
Character vector of column names to be excluded from selection.
A rescaled object.
normalize() standardize() ranktransform()
normalize()
standardize()
ranktransform()
Other transform utilities: normalize(), ranktransform(), standardize()
# NOT RUN { change_scale(c(0, 1, 5, -5, -2)) change_scale(c(0, 1, 5, -5, -2), to = c(-5, 5)) head(change_scale(trees)) # }
Run the code above in your browser using DataLab