Dtable {dbmss} | R Documentation |
Creates an object of class "Dtable"
representing a set of points with weights and labels and the distances between them.
Dtable(Dmatrix, PointType = NULL, PointWeight = NULL)
Dmatrix |
A square matrix containing distances. |
PointType |
A vector describing the point types. Its length must correspond to the number of points. |
PointWeight |
A vector describing the point weights. Its length must correspond to the number of points. |
The distance matrix is not necessarily symmetric, so distances are understood in the common sense, not in the mathematical sense. Asymmetric distances are appropriate when paths between points are one-way only.
The points of origin are in lines, the targets in columns. The diagonal of the matrix must contain zeros (the distance between a point and itself is 0), and all other distances must be positive (they can be 0).
An object of class "Dtable"
. It is a list:
Dmatrix |
The distance matrix. |
n |
The number of points. |
marks |
A list of two items: |
# A Dtable containing two points
Dmatrix <- matrix(c(0,1,1,0), nrow=2)
PointType <- c("Type1", "Type2")
PointWeight <- c(2,3)
Dtable(Dmatrix, PointType, PointWeight)