Draw and return polygons on a shiny gadget

ggpolygon(data, xvar, yvar)

Arguments

data

a data.frame

xvar

a string defining the variable to use for x

yvar

a string defining the varible to use for y

Value

data.frame with the coordinates delimiting the polygon

# ggpolygon(iris, "Sepal.Length", "Petal.Length")

ggpolygon sample