Computes and plots the Swiss Roll dataset of a given size and height.
It uses the library "rgl" for rotatable 3D scatterplots.
Usage
SwissRoll(N = 2000, Height = 30, Plot=FALSE)
Arguments
N
number of samples
Height
controls the spreading of the samples in the second dimension
Plot
a boolean specifying whether to plot the Swiss Roll dataset or not
Value
'SwissRoll' returns all N samples as a Nx3-matrix
Author(s)
Christoph Bartenhagen
Examples
## compute and plot a Swiss Roll dataset with 1.000 samples
data=SwissRoll(N = 1000, Plot=TRUE)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(RDRToolbox)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/RDRToolbox/SwissRoll.Rd_%03d_medium.png", width=480, height=480)
> ### Name: SwissRoll
> ### Title: The Swiss Roll dataset
> ### Aliases: SwissRoll
>
> ### ** Examples
>
> ## compute and plot a Swiss Roll dataset with 1.000 samples
> data=SwissRoll(N = 1000, Plot=TRUE)
>
>
>
>
>
> dev.off()
null device
1
>