Description Usage Arguments Details Value See Also Examples
Given a DemographicArray
with dimtypes
"origin"
and "destination"
, set cells on the "diagonal",
ie where the origin equals the destination, to a value such as 0
or NA
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | resetDiag(object, base = NULL, reset = NULL)
## S4 method for signature 'Counts,ANY,ANY'
resetDiag(object, base = NULL, reset = NULL)
## S4 method for signature 'Counts,ANY,missing'
resetDiag(object, base = NULL, reset = NULL)
## S4 method for signature 'Counts,ANY,'NULL''
resetDiag(object, base = NULL, reset = NULL)
## S4 method for signature 'Values,ANY,ANY'
resetDiag(object, base = NULL, reset = NULL)
## S4 method for signature 'Values,ANY,'NULL''
resetDiag(object, base = NULL, reset = NULL)
## S4 method for signature 'Values,ANY,missing'
resetDiag(object, base = NULL, reset = NULL)
|
object |
An object of class |
base |
Character vector giving the "base names" for the
origin-destination pairs. If |
reset |
The new value to be used on the diagonal. |
The origin and destination dimensions are specified via the base
argument. base
is the "base name", that is, the first part
of the dimension name. If is an origin dimension called
"region_orig"
, for instance, and a destination called
"region_dest"
, then the base name is "region"
.
If no base
argument is supplied, then all origin and
destination dimensions in the object are used.
If no reset
argument is supplied, then it defaults to
0
in the case of Counts
objects and
NA
in the case of Values
objects.
The original object, with the objects on the diagonal changed.
collapseOrigDest
to collapse away
origin and destination dimensions. alignPair
puts origin and destination categories in the same order.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.