Learn R Programming

desire (version 1.0.7)

dsplot: Desirability Plot

Description

Plot a desirability function and its relation to an arbitrary expression.

Usage

dsplot(expr, f, from = NULL, to = NULL, n = 101, show.zero = TRUE, interest = NULL, main = "Desirability Plot", sub = NULL, ...)

Arguments

expr
an expression written as a function of 'x', or alternatively the name of a function which will be plotted.
f
desirability function
from,to
the range over which the function will be plotted.
n
integer; the number of x values at which to evaluate.
show.zero
add dotted line to visualize the origin
interest
vector of interesting points
main
an overall title for the plot
sub
a subtitle for the plot
...
parameters passed to low level plot functions

Examples

Run this code
d1 <- harrington2(2, 4, 2)
dsplot(x*log(x), d1,
       from=0, to=6, n=507,
       interest=c(2, 3, 4))

Run the code above in your browser using DataLab