% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/polygon_df.R
\name{create_polygon_df}
\alias{create_polygon_df}
\title{Create a \code{polygon_df} object from the given coordinates}
\usage{
create_polygon_df(x, y, id = 1L)
}
\arguments{
\item{x, y}{coordinates of polygon. not necessarily closed.}

\item{id}{a numeric vector used to separate locations in x,y into multiple polygons}
}
\value{
data.frame with x, y, id columns.
}
\description{
code using \code{polygon_df} should not assume that the first and last point
within each id are the same.  i.e. they may have to manulaly set a final
point equal to the initial point if that is what their graphics system
desires
}
\examples{
  df <- create_polygon_df(x = c(0, 0, 1, 1), y = c(0, 1, 1, 0))
  is_polygon_df(df)

}
