cities {Riemann} | R Documentation |
Data : Populated Cities in the U.S.
Description
As of January 2006, there are 60 cities in the contiguous U.S. with population size
larger than . We extracted information of the cities from the data
delivered by maps package. Variables
coord
and cartesian
are
two identical representations of locations, which can be mutually converted by
sphere.convert
.
Usage
data(cities)
Format
a named list containing
- names
a length-
vector of city names.
- coord
a
matrix of latitude and longitude.
- cartesian
a
matrix of cartesian coordinates on the unit sphere.
- population
a length-
vector of cities' populations.
See Also
Examples
## LOAD THE DATA AND WRAP AS RIEMOBJ
data(cities)
myriem = wrap.sphere(cities$cartesian)
## COMPUTE INTRINSIC/EXTRINSIC MEANS
intmean = as.vector(riem.mean(myriem, geometry="intrinsic")$mean)
extmean = as.vector(riem.mean(myriem, geometry="extrinsic")$mean)
## CONVERT TO GEOGRAPHIC COORDINATES (Lat/Lon)
geo.int = sphere.xyz2geo(intmean)
geo.ext = sphere.xyz2geo(extmean)
[Package Riemann version 0.1.4 Index]