powered by
Transforms 3D cartesian coordinates to spherical coordinates. The user can choose to return the spherical coordinates in degrees or radians.
car2sph(x, y, z, deg = TRUE)
x values, can also contain a matrix of x, y and z (in that order).
y values.
z values
Should degrees be returned (default) or radians.
A data.frame is returned containing the columns long (longitude), lat (latitude) and radius.
This is a low level function that is used for plot transformations.
sph2car
# NOT RUN { print(car2sph(x=1,y=1,z=0,deg=TRUE)) # }
Run the code above in your browser using DataLab