as_coord2d | R Documentation |
as_coord2d()
casts to a Coord2D class object
as_coord2d(x, ...)
## S3 method for class 'angle'
as_coord2d(x, radius = 1, ...)
## S3 method for class 'character'
as_coord2d(x, ...)
## S3 method for class 'complex'
as_coord2d(x, ...)
## S3 method for class 'Coord3D'
as_coord2d(
x,
permutation = c("xyz", "xzy", "yxz", "yzx", "zyx", "zxy"),
...,
plane = as_plane3d("xy-plane"),
scale = 0,
alpha = angle(45, "degrees")
)
## S3 method for class 'data.frame'
as_coord2d(x, ...)
## S3 method for class 'list'
as_coord2d(x, ...)
## S3 method for class 'matrix'
as_coord2d(x, ...)
## S3 method for class 'numeric'
as_coord2d(x, y = rep_len(0, length(x)), ...)
## S3 method for class 'Coord2D'
as_coord2d(x, ...)
x |
An object that can be cast to a Coord2D class object such as a matrix or data frame of coordinates. |
... |
Further arguments passed to or from other methods |
radius |
A numeric vector of radial distances. |
permutation |
Either "xyz" (no permutation), "xzy" (permute y and z axes), "yxz" (permute x and y axes), "yzx" (x becomes z, y becomes x, z becomes y), "zxy" (x becomes y, y becomes z, z becomes x), "zyx" (permute x and z axes). This permutation is applied before the (oblique) projection. |
plane |
A Plane3D class object representing the plane
you wish to project to or an object coercible to one using |
scale |
Oblique projection foreshortening scale factor.
A (degenerate) |
alpha |
Oblique projection angle (the angle the third axis is projected going off at).
An |
y |
Numeric vector of y-coordinates to be used. |
A Coord2D class object
df <- data.frame(x = sample.int(10, 3),
y = sample.int(10, 3))
as_coord2d(df)
as_coord2d(complex(real = 3, imaginary = 2))
as_coord2d(angle(90, "degrees"), radius = 2)
as_coord2d(as_coord3d(1, 2, 2), alpha = degrees(90), scale = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.