# NOT RUN {
# Create data frame of boundary points (anti clockwise!)
pts <- data.frame(
x = c(1, 2, 1.7, 1.3),
y = c(1, 1, 2, 2)
)
# Convert to SpatialPolygonsDataFrame
pol <- spoly(pts)
# Plot it!
ggplot() +
gg(pol)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab