This is the R implementation of Spatial median and Spherical principal components described in the paper Robust functional estimation using the median and spherical principal components by Gervini (2008). The original MATLAB code may be found in Prof. Gervin's personal website.