Learn R Programming

adas.utils (version 1.3.0)

fp_scale: Retrieve the scale of a factor

Description

This is a utility function mostly for internal use.

Usage

fp_scale(fp, fct)

Value

A vector representing the factor range in scaled units; scales must have been added with fp_add_scale. If scales are not available, the range in coded units is returned (i.e. c(-1,1))

Arguments

fp

The factorial plan object

fct

The standard name of the factor as a string (e.g. "A", or "B", etc.)

See Also

fp_add_scale()

Examples

Run this code
df <- fp_design_matrix(2) %>%
  fp_add_names(A="Temperature", B="Pressure") %>%
  fp_add_scale(A=c(20,30), B=c(3, 7))
fp_scale(df, "A")

Run the code above in your browser using DataLab