as_coord3d | R Documentation |
as_coord3d()
casts to a Coord3D class object
as_coord3d(x, ...)
## S3 method for class 'angle'
as_coord3d(x, radius = 1, inclination = NULL, z = NULL, ...)
## S3 method for class 'character'
as_coord3d(x, ...)
## S3 method for class 'data.frame'
as_coord3d(x, ..., z = NULL)
## S3 method for class 'list'
as_coord3d(x, ..., z = NULL)
## S3 method for class 'matrix'
as_coord3d(x, ...)
## S3 method for class 'numeric'
as_coord3d(x, y = rep_len(0, length(x)), z = rep_len(0, length(x)), ...)
## S3 method for class 'Coord3D'
as_coord3d(x, ...)
## S3 method for class 'Coord2D'
as_coord3d(x, z = rep_len(0, length(x)), ...)
x |
An object that can be cast to a Coord3D class object such as a matrix or data frame of coordinates. |
... |
Further arguments passed to or from other methods |
radius |
A numeric vector. If |
inclination |
Spherical coordinates inclination angle aka polar angle.
|
z |
Numeric vector of z-coordinates to be used |
y |
Numeric vector of y-coordinates to be used
if |
A Coord3D class object
as_coord3d(x = 1, y = 2, z = 3)
df <- data.frame(x = sample.int(10, 3),
y = sample.int(10, 3),
z = sample.int(10, 3))
as_coord3d(df)
# Cylindrical coordinates
as_coord3d(degrees(90), z = 1, radius = 1)
# Spherical coordinates
as_coord3d(degrees(90), inclination = degrees(90), radius = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.