gcurve: gcurve

Description Usage Arguments Value Examples

Description

Returns a data.frame associated with a call to base::curve.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
gcurve(
  expr,
  from = NULL,
  to = NULL,
  n = 101,
  add = FALSE,
  type = "l",
  xname = "x",
  xlab = xname,
  ylab = NULL,
  log = NULL,
  xlim = NULL,
  category = NULL,
  ...
)

Arguments

expr

expression to be plotted

from

lower bound of x-values

to

upper bound of x-values

n

number of points to plot

category

optional text column appends to data.frame returned

Value

A data.frame is returned with x and y-values and an optional column called category

Examples

1
2
3
4
5
6
## Not run: 
curve(dnorm(x, mean=0, sd=1), from=-4, to = 4, n= 1001)
ggplot(gcurve(expr = dnorm(x, mean=0, sd=1),from=-4, to = 4, n= 1001,
category= "Standard Normal"), aes(x=x, y=y)) + geom_line()

## End(Not run)

lylyf1987/GNGpkg documentation built on May 19, 2020, 12:07 a.m.