Fortunately, it seems that NbClust is one gigantic messy function with some other functions in it and lots of bad code. Bookmarking is done in one of two places.
Create a copy of NbClust :
> MyNbClust = NbClust
and then edit this function. Change the title to:
MyNbClust <- function (data, diss = "NULL", distance = "euclidean", min.nc = 2, max.nc = 15, method = "ward", index = "all", alphaBeale = 0.1, plotetc=FALSE) {
and then wrap the build code in if blocks. On line 1588:
if(plotetc){ par(mfrow = c(1, 2)) [etc] cat(paste(... }
and similarly around line 1610. Save. Now use:
nc = MyNbClust(...etc....)
and you donβt see any graphs unless you add plotetc=TRUE .
Then ask the developers to enable your patch.
source share