rubikclust | R Documentation |
Handle and operate on Nx3 matrix, where N is the number of samples and data are collected on 3 variables.
rubikclust(X, min.space = 0.4, rotation = TRUE)
X |
A data matrix for which rows represent samples and the 3 columns represent features. Missingness is not allowed. |
min.space |
A value to specify a minimum space between 2 consecutive projected values. Default = 0.4. |
rotation |
To specify if rotation is enabled or not. Default = TRUE. |
The function rubikClust is able to take up to 3 variables (N x 3 matrix). In case, a matrix contains more than 3 columns, only the first three columns are used; the other columns are ignored.
The returned value is a vector of numbers representing cluster memberships.
#Load simulated dataset data(example_SNP) PCs <- cal.pc.linear(simsnp$snp, no.pc = 3) #Run rubikclust with the default parameters groups <- rubikclust(PCs$PC) #Check clustering results print(groups) #Check cluster's distribution table(groups) #Check the plot, highlight the points according to the clustering result mylabels <- paste0("group", as.factor(groups)) plot3views( PCs$PC, labels = mylabels) #Run rubikclust with min.space = 0.02 groups <- rubikclust(PCs$PC, min.space = 0.02) #Check clustering results print(groups) #Check cluster's distribution table(groups) #Check the plot, highlight the points according to the clustering result mylabels <- paste0("group", as.factor(groups)) plot3views( PCs$PC, labels = mylabels)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.