Generate an object that acts like a circle

gen_circles(df)

Arguments

df

data.frame with columns x, y, r

Examples

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