get_curves: Generate a data frame with y values in increments of a given...

Description Usage Arguments Value Examples

View source: R/sigmoid.R

Description

Useful for plotting fitted curves.

Usage

1
get_curves(object, x_range = NULL, logrange = TRUE, npoint = 100)

Arguments

object

An model object with a predict() method generated from drm() and the argument fct = LL.4().

x_range

An optional 2-element numeric vector giving the x-range. If 'NULL', will calculate range from 'object'.

logrange

Logical. If TRUE increments are in log space.

npoint

Numeric. The number of increments in the x range.

Value

A data frame with predicted x and y values pulled from teh model call.

Examples

1
2
3
4
5
6
7
fit_drc <- drc::drm(disp~wt, data=mtcars, fct=drc::LL.4())
curve_drc <- get_curves(fit_drc, range(mtcars$wt), logrange = FALSE)
plot(wt~disp, data=curve_drc) # names come from model call

fit_lm <- lm(disp~wt, data = mtcars)
curve_lm <- get_curves(fit_lm, range(mtcars$wt), logrange = FALSE)
plot(wt~disp, data=curve_lm)

hemoshear/assayr2 documentation built on Nov. 8, 2019, 6:13 p.m.