Learn R Programming

scan (version 0.64.0)

rescale: Rescales values of an scdf file

Description

This function scales the measured values of an scdf file. It allows for mean centering and standardization across all cases included in an scdf.

Usage

rescale(data, ..., m = 0, sd = 1)

Value

An scdf with the scaled values.

Arguments

data

A single-case data frame. See scdf() to learn about this format.

...

Names of variables to be standardized.

m

The target mean. If set NULL, it is not changed.

sd

The target standard deviation. If set NULL, it is not changed.

Author

Juergen Wilbert

See Also

Other data manipulation functions: add_l2(), as.data.frame.scdf(), as_scdf(), fill_missing(), moving_median(), outlier(), ranks(), scdf(), select_cases(), set_vars(), shift(), smooth_cases(), standardize(), truncate_phase()

Examples

Run this code

## Standardize a multiple case scdf and compute an hplm
exampleAB_50 |>
  rescale(values, mt) |>
  hplm()

Run the code above in your browser using DataLab