Learn R Programming

cems (version 0.4)

swissroll: Fourpeaks Function

Description

Swissroll data set.

Arguments

Examples

Run this code
library(rgl)
data(swissroll)
#create 1000 samples with standard parameters
d <- swissroll()

#X contains orginal data
plot3d(d$X)
#Xn conatins data with gaussina noise added orthogoally
plot3d(d$Xn)

#create 2000 samples with different parameters
#phi - number of revolutions
#nstd - std of normal noise added orthogonally
d <- swissroll(2000, nstd = 0.5, height = 5, phi = 2*pi)
plot3d(d$Xn)

Run the code above in your browser using DataLab