# Create noisy circle data set
data = data.frame(x = sapply(1:1000, function(x) cos(x)) + runif(1000, 0, .25),
y = sapply(1:1000, function(x) sin(x)) + runif(1000, 0, .25))
data.dists = dist(data)
# Set ball radius
eps = 1
# Do single-linkage clustering in the balls to produce Mapper graph
create_clusterball_mapper_object(data, data.dists, data.dists, eps)
Run the code above in your browser using DataLab