powered by
Returns the first n rows and first k columns of a distance matrix returned by the dist.matrix function.
n
k
dist.matrix
# S3 method for dist.matrix head(x, n = 6L, k = n, …)
an distance matrix of class dist.matrix
a single integer specifying the number of rows to extract
a single integer specifying the number of columns to extract (default: same as number of rows)
all other arguments are silently ignored
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.
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.
head
tail
head for the generic method.
# NOT RUN { dm <- dist.matrix(DSM_Vectors[1:100, ]) print(head(dm, 8, 5), digits=3) # }
Run the code above in your browser using DataLab