gen_circles: Generate an object that acts like a circle

Description Usage Arguments Examples

View source: R/anem_geoprocessing.R

Description

Generate an object that acts like a circle

Usage

1
gen_circles(df, npoints = 100, include_data = FALSE)

Arguments

df

data.frame with columns x, y, r

npoints

number of points to use in each circle

include_data

boolean that determines whether additional columns are returned

Examples

1
2
3
4
5
6
library(ggplot2)
df <- data.frame(x=1:3,y=1:3,r=c(0.5,1,1.5), foo = "hello")
circles <- gen_circles(df)
ggplot(circles) + geom_polygon(aes(x,y,group=id),color="black",alpha=0.5) + coord_equal()

circles_with_data <- gen_circles(df, npoints = 5, include_data = TRUE)

gopalpenny/anem documentation built on Dec. 20, 2020, 5:27 a.m.