View source: R/sampleClustering.R
imgClassif | R Documentation |
Sort images (if available) in different directories according to a clustering result.
imgClassif(data.sample, imgdir, method, user.name = "")
data.sample |
list containing features, profiles and clustering results. |
imgdir |
character vector specifying the path of the images directory. |
method |
character vector specifying the clustering method (already performed) to use. |
user.name |
character vector specifying the user name. |
imgClassif sorts images (if available) in different directories according to a clustering result
images files in the different directories, csv file containing the detail.
sigClassif
dat <- rbind(matrix(rnorm(100, mean = 0, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 2, sd = 0.3), ncol = 2),
matrix(rnorm(100, mean = 4, sd = 0.3), ncol = 2))
tf1 <- tempfile()
write.table(dat, tf1, sep=",", dec=".")
rep <- system.file("extdata", package="RclusTool")
imgdir <- file.path(rep, "img_example")
dir.results <- tempdir()
x <- importSample(file.features=tf1, dir.images=imgdir, dir.save=dir.results)
x <- computeUnSupervised(x, K=3, method.name="K-means")
imgClassif(x, imgdir, method = "K-means_preprocessed")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.