R/segment.plot.r

#' @name segment.plot
#' @title Plot Segmented Test
#' @description
#' Plots the segmented function, if successful.
#' @param mod  Segmented model object
#' @param dosecolumn   Name of dose column.
#' @param targetcolumn   Name of response column.
#' @param data   Input dataframe.
#' @keywords internal

segment.plot <- function (mod=NA, dosecolumn="", targetcolumn="", data=NA) {

    graphics::plot(data[,dosecolumn], data[,targetcolumn], type="p", xlab = dosecolumn, ylab = targetcolumn, pch=19)
    segmented::plot.segmented(mod, add=TRUE)

}

Try the drsmooth package in your browser

Any scripts or data that you put into this service are public.

drsmooth documentation built on May 1, 2019, 10:28 p.m.