sm.sphere {sm} | R Documentation |
This function creates a density estimate from data which can be viewed as lying on the surface of a sphere. Directional data form a principal example. The data are displayed in spherical form and a density estimate may be superimposed. The angle of view may be altered. An interactive panel is available to control some features of the estimate and the display. Only modest amounts of data may be used. The limit will depend on the memory available.
sm.sphere(lat, long, kappa = 20, hidden = FALSE, sphim = FALSE, addpoints = FALSE, ...)
lat |
a vector giving the latitude component of the data in degrees from the equator. |
long |
a vector giving the longitude component of the data in degrees east. |
kappa |
the smoothing parameter used to construct the density estimate. The kernel
function is a Fisher distribution and |
hidden |
a logical value which, when set to |
sphim |
a logical value which controls whether a density estimate is constructed and displayed on the sphere in image form. |
addpoints |
a logical value which controls whether the data points are added to the plot of the density estimate. |
... |
arguments for |
see Section 1.5 of the reference below.
a list containing the value of the smoothing parameter and the rotation angles of the displayed plot.
none.
Bowman, A.W. and Azzalini, A. (1997). Applied Smoothing Techniques for Data Analysis: the Kernel Approach with S-Plus Illustrations. Oxford University Press, Oxford.
lat <- rnorm(50, 10, 15) long <- c(rnorm(25, 300, 15), rnorm(25, 240, 15)) par(mfrow=c(1,2)) sm.sphere(lat, long) sm.sphere(lat, long, sphim=TRUE, kappa=15) par(mfrow=c(1,1))