Question

By using function dbscan as below:

ds <- dbscan(x, 0.2,showplot=1)

We can see plots of sets in every iteration. Unfortunately, there is a lot of plots, so in R-Studio I have only the 30 last. How can I get all plots?

If i do:

jpeg("dbscans.jpeg")
ds <- dbscan(x, 0.2,showplot=1)
dev.off()

It of course doesn't work.

Was it helpful?

Solution

I think it's because you are outputting to a jpeg. This works for me:

library(fpc)
pdf("dbscan.pdf")
ds <- dbscan(mtcars[,c(1,2)],2,showplot=T)
dev.off()

BTW: you don't need to assign dbscan(...) to anything. This works as well:

library(fpc)
pdf("dbscan.pdf")
dbscan(mtcars[,c(1,2)],2,showplot=T)
dev.off()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top