Learn R Programming

RclusTool (version 0.91)

saveSummary: Clusters summaries saving

Description

Save clusters summaries results in a csv file.

Usage

saveSummary(filename.csv, cluster.summary, dir, info = NULL)

Arguments

filename.csv

character vector specifying the path and the name of the csv file.

cluster.summary

data.frame containing the clusters summaries results.

dir

character vector specifying the directory where to save the csv file.

info

character vector about sample or clustering.

Value

csv file containing clusters summaries results.

Details

saveSummary saves clusters summaries results in a csv file

See Also

loadSummary

Examples

Run this code
# NOT RUN {
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))
colnames(dat) <- c("x","y")
tf1 <- tempfile()
write.table(dat, tf1, sep=",", dec=".")

x <- importSample(file.features=tf1, dir.save=tempdir())
res <- KmeansQuick(x$features$initial$x, K=3)
labels <- formatLabelSample(res$cluster, x)
cluster.summary <- clusterSummary(x, labels)

tf2 <- tempfile()
saveSummary(basename(tf2), cluster.summary, tempdir())


# }

Run the code above in your browser using DataLab