R: Generation of data set containing two clusters with untypical...

shapes.blocks3d {clusterSim} | R Documentation

## Generation of data set containing two clusters with untypical shapes (cube divided into two parts by main diagonal plane)

### Description

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)

### Usage

    shapes.blocks3d(numObjects=180,shapesUnitSize=0.5, shape2coordinateX=1.2,
    shape2coordinateY=1.2,shape2coordinateZ=1.2, outputCsv="", outputCsv2="",
    outputColNames=TRUE, outputRowNames=TRUE)

### Arguments

`numObjects` | number of objects in each cluster - positive integer value or vector with length=2
`shapesUnitSize` | length of one unit for shape (maximal heigth, width and depth of shape is 2*shapesUnitSize)
`shape2coordinateX` | maximal value for second shape in first (`X`) dimension
`shape2coordinateY` | maximal value for second shape in second (`Y`) dimension
`shape2coordinateZ` | maximal value for second shape in third (`Z`) dimension
`outputCsv` | optional, name of csv file with generated data (first column contains id, second - number of cluster and others - data)
`outputCsv2` | 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` | `outputColNames=TRUE` indicates that output file (given by `outputCsv` and `outputCsv2` parameters) contains first row with column names
`outputRowNames` | `outputRowNames=TRUE` indicates that output file (given by `outputCsv` and `outputCsv2` parameters) contains a vector of row names

### Value

`clusters` | cluster number for each object
`data` | generated data - matrix with objects in rows and variables in columns

### Author(s)

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 http://keii.ue.wroc.pl/clusterSim/

### See Also

`shapes.worms`,`shapes.circles2`,`shapes.circles3`,`shapes.bulls.eye`,`shapes.two.moon`

### Examples

    library(clusterSim)
    library(rgl)
    sb3d<-shapes.blocks3d(300,1,3,3,3)
    plot3d(sb3d$data,col=rainbow(2)[sb3d$clusters])

[Package clusterSim version 0.49-2 Index]