## Usage

arrow_head_function(
.fun = stats::dnorm,
lower_bound = -4,
upper_bound = 4,
...,
base_width = 0,
thickness = 1.2,
closed = TRUE,
minimum_value = NA,
rotate = 0,
rescale = c(1, 1),
nudge = c(0, 0),
transformations = c("rotater", "rescaler", "nudger"),
n = 1001,
plot = FALSE
)

## Arguments

.fun

a function (defaults to dnorm)

lower_bound

lowest value passed to .fun

upper_bound

highest value passed to .fun

...

arguments passed to .fun

base_width

If closed, size of feet

thickness

If closed, thickness of shape (can be negative)

closed

make polygon closed

minimum_value

smallest value in function

rotate

rescale

a single value or 2-length vector for scaling in x and y

nudge

a single value or 2-length vector for nudging in x and y

transformations

a vector of transformation functions

n

number of points in polygon

plot

a matrix

## Examples

# A normal distribution
xy <- arrow_head_function(dnorm, plot = TRUE)

# if closed = FALSE, set thickness and base_width
xy <- arrow_head_function(dnorm, plot = TRUE, closed = FALSE,
thickness = 1.5,
base_width = .25)

# A cauchy distribution
xy <- arrow_head_function(dt, df = 1, plot = TRUE)

# open with thickness = 1.5
dt,
df = 1,
plot = TRUE,
closed = FALSE,
thickness = 1.5
)

# thickness > 2 creates a bulge
dt,
df = 1,
lower_bound = -3.25,
upper_bound = 3.25,
closed = FALSE,
thickness = 2.5,
plot = TRUE,
rescale = 1 / 3,
nudge = c(2 / 3, 0)
)

# Make a new function
mytrident <- function(x, s = 160) {
k <- length(x)
y1 <- dbeta(x, shape1 = s, shape2 = s) * 2
y2 <- dbeta(x, shape1 = s * .9, shape2 = s * .1)
y3 <- dbeta(x, shape1 = s * .1 , shape2 = s * .9)
y1 + y2 + y3
}