Description Usage Arguments Value Note See Also
Map or merge geo group numbers into new group ids.
1 2 3 4 5 6 7 | MapGeoGroups(obj) <- value
## S3 replacement method for class 'GeoAssignment'
MapGeoGroups(obj) <- value
## S3 replacement method for class 'GeoExperimentData'
MapGeoGroups(obj) <- value
|
obj |
an object. |
value |
(integer vector, NA allowed, NULL or empty integer vector allowed) mapping of old group numbers to new ones. The length must be exactly equal to the number of old groups in the object. The old numbers match the positions of the index, and the new ones are the values in the vector. For example, c(2, 1) maps 1->2 and 2->1; c(3, 2, 1) maps 1->3, 3->1 and 2 stays unchanged; '1:2' has no effect; NOTE: c(1, 1) merges groups 1 and 2 into 1! If the 'geo.group' is NA in the object, its value will be NOT changed. If the data has only NAs, the only mapping that is allowed is an empty vector, resulting in no change in the original object. The special value '0' (group of excluded geos) will also be unchanged. |
An object identical to 'obj' except the 'geo.groups' column has (possibly) changed.
If all group ids in 'geo.group' are NA, nothing changes as 'NAs'
cannot be mapped. Try 'SetGeoGroup<-' instead, to map specific geos
first into group ids.
The group number '0' (group of excluded geos)
remains unchanged. It is not possible to map this group to another. For
that purpose, map geos explicitly to desired groups using the
replacement method 'SetGeoGroup<-'.
It is however possible to
exclude a complete group by mapping it to 0 by including 0 in the map,
for example c(1, 2, 0) maps group 3 to 0, leaving group numbers 1 and 2
unchanged.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.