head.dist.matrix | R Documentation |
Returns the first n
rows and first k
columns of a distance matrix returned by the dist.matrix
function.
## S3 method for class 'dist.matrix' head(x, n = 6L, k = n, ...)
x |
an distance matrix of class |
n |
a single integer specifying the number of rows to extract |
k |
a single integer specifying the number of columns to extract (default: same as number of rows) |
... |
all other arguments are silently ignored |
Note that in contrast to other head
methods, negative values of n
(and k
) are not supported. There is also currently no corresponding tail
method.
A numeric matrix with n
rows and k
columns.
Note: this matrix is no longer marked as an object of class dist.matrix
and thus prints nicely without attributes.
Stephanie Evert (https://purl.org/stephanie.evert)
head
for the generic method.
dm <- dist.matrix(DSM_Vectors[1:100, ]) print(head(dm, 8, 5), digits=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.