Generation of data set containing two clusters with untypical shapes (cube starting at point (0,0,0) divided into two parts by main diagonal plane)
shapes.blocks3d(numObjects=180,shapesUnitSize=0.5, shape2coordinateX=1.2,
shape2coordinateY=1.2,shape2coordinateZ=1.2, outputCsv="", outputCsv2="",
outputColNames=TRUE, outputRowNames=TRUE)cluster number for each object
generated data - matrix with objects in rows and variables in columns
number of objects in each cluster - positive integer value or vector with length=2
length of one unit for shape (maximal heigth, width and depth of shape is 2*shapesUnitSize)
maximal value for second shape in first (X) dimension
maximal value for second shape in second (Y) dimension
maximal value for second shape in third (Z) dimension
optional, name of csv file with generated data (first column contains id, second - number of cluster and others - data)
optional, name of csv (a comma as decimal point and a semicolon as field separator) file with generated data (first column contains id, second - number of cluster and others - data)
outputColNames=TRUE indicates that output file (given by outputCsv and outputCsv2 parameters) contains first row with column names
outputRowNames=TRUE indicates that output file (given by outputCsv and outputCsv2 parameters) contains a vector of row names
Marek Walesiak marek.walesiak@ue.wroc.pl, Andrzej Dudek andrzej.dudek@ue.wroc.pl
Department of Econometrics and Computer Science, University of Economics, Wroclaw, Poland
shapes.worms,shapes.circles2,shapes.circles3,shapes.bulls.eye,shapes.two.moon
library(clusterSim)
#library(rgl)
sb3d<-shapes.blocks3d(300,1,3,3,3)
#plot3d(sb3d$data,col=rainbow(2)[sb3d$clusters])
Run the code above in your browser using DataLab