calc_vertex: Calculate the vertex of a parabola defined by a quadratic...

Description Usage Arguments Value

View source: R/wg_util.R

Description

Calculates the vertex for f(x) = ax^2 + bx + c according to the formula:

vertex x = -b/2a

vertex y = f(vertex x)

Usage

1
calc_vertex(a, b, c)

Arguments

a

numeric coefficient for the squared term

b

numeric coefficient for the 1st order term

c

numeric intercept

Value

named vector with the x and y coordinates of the vertex


wgaul/wgutil documentation built on June 1, 2020, 3:39 a.m.