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)
Run the code above in your browser using DataLab