R/computeIntercept.R

Defines functions computeIntercept

Documented in computeIntercept

#' Compute intercept given slope and point coordinates
#' 
#' @param m A numeric slope
#' @param point_coord A numeric vector of point coordinates through which the line passes
#' @return A numeric intercept
#' @export
computeIntercept <- function(m,point_coord){
  o <- point_coord[2]-m*point_coord[1]
  names(o) <- "intercept"
  return(o)
}
msxakk89/dat documentation built on Aug. 3, 2020, 6:39 p.m.