circle_fun: Generate circle data.

Description Usage Arguments Examples

View source: R/circle_fun.R

Description

This function generates data that can be used to draw circles in ggplot.

Usage

1
circle_fun(center = c(0, 0), radius = 2, npoints = 100)

Arguments

center

Numeric vector for the x and y position of the center of the circle. Default is c(0, 0).

radius

Radius of the circle. Default is 2.

npoints

The number of data points to generate. Default is 100.

Examples

1
2
3
4
5
6
## Not run: 
circle_data <- circle_fun(c(1,-1), 2.3, npoints = 100)
library("ggplot2")
ggplot(circle_data, aes(x,y)) + geom_path()

## End(Not run)

gcpsresearch/refuns documentation built on June 23, 2020, 11:02 a.m.