Function for k-means clustering of genes according to their expression distribution in 2D or multi-dimensional space
kmeans_haystack(x, ...)# S3 method for matrix
kmeans_haystack(x, dim1 = 1, dim2 = 2, ...)
# S3 method for data.frame
kmeans_haystack(x, dim1 = 1, dim2 = 2, ...)
a matrix or other object from which coordinates of cells can be extracted.
further parameters passed down to methods.
column index or name of matrix for x-axis coordinates.
column index or name of matrix for y-axis coordinates.