If you look at the help page ( ?dbscan ), it will be organized, like everyone else, in sections labeled "Description, usage, arguments, details and meaning." The Value section describes what the dbscan function dbscan . In this case, it is just a list (standard R data type) with several components.
The cluster component is just an integer vector, the length of which is equal to the number of rows in your data, which indicates which cluster each observation belongs to. Thus, you can use this vector as a subset of your data to retrieve only those clusters that you would like, and then draw only these data points.
For example, if we use the first example on the help page:
set.seed(665544) n <- 600 x <- cbind(runif(10, 0, 10)+rnorm(n, sd=0.2), runif(10, 0, 10)+rnorm(n, sd=0.2)) ds <- dbscan(x, 0.2)
we can use the ds result to build only points in clusters 1-3:
#Plot only clusters 1, 2 and 3 plot(x[ds$cluster %in% 1:3,])
joran source share