as_complex | R Documentation |
Convenience function for allowing any of the usual ways two dimensional points can be specified in traditional graphics to define a complex variable
as_complex(x, y = NULL)
x, y |
A two dimensional specification, as allowed by grDevices::xy.coords |
A complex vector
loc <- cbind(runif(20), runif(20)) z <- as_complex(loc) z <- z-mean(z) Mod(z) <- 1 z <- z[order(Arg(z))] plot(closed_curve(z), asp = 1, col = 2) lines(z, col = 4) points(z, pch=16)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.