Learn R Programming

cplots (version 0.5-0)

circtrans: Circular Transformation Formula

Description

The function performs circular transformation of density or frequency, in an area-proportional or height-proportional manner.

Usage

circtrans(x, radius = 0, area.prop = TRUE, factor = 1)

Arguments

x

a numeric vector storing angular values between 0 and 2 pi, or an object that can be coerced to.

radius

the radius of the reference circle.

area.prop

logical; if TRUE, an area-proportional transformation is applied; if FALSE, a height-proportional transformationis applied.

factor

a positive number representing the scale factor to scale the entire plot.

Value

A numerical vector of the transformed values

References

Xu, D. and Wang, Y. (2020) Area-proportional Visualization for Circular Data. Journal of Computational and Graphical Statistics, 29, 351-357.

See Also

scalefactor

Examples

Run this code
# NOT RUN {
library(circular)
x = as.vector(rvonmises(20, circular(pi), 10))
circtrans(x)                            # area-proportional transformation
circtrans(x, area.prop = FALSE)         # height-proportional transformation
circtrans(x, factor = 2)                # with a scaling factor

# }

Run the code above in your browser using DataLab