as.data.frame.movement_matrix | R Documentation |
Convert a movement_matrix
object into a data.frame
with
columns origin
(character), destination
(character) and movement
(numeric).
The origins and the destinations are taken from the row and column names of the matrix,
respectively. The entries where origins are equal to destinations (that is, the matrix
diagonal) are removed during this conversion process.
## S3 method for class 'movement_matrix'
as.data.frame(x, ...)
x |
a |
... |
additional arguments to be passed to or from methods. |
A data.frame
with columns origin
(character), destination
(character)
and movement
(numeric)
If the given matrix does not contain any row or column names, the function will generate a warning and the origin and destinations will be the row and column numbers of the relevant matrix cell.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.