Closed wleoncio closed 4 years ago
The first error is telling that the user should run clustexp before comptsne because the comptsne() uses the output of clustexp().
I see. So I'll make the changes to KmeanOrder (and other k-mean dependent functions) assuming there are no alternatives to Clustexp as a pre-requisite for them.
Issue resolved on dev (commit 19d06dfba8b27d722b165612ee0cdd1aa713949f).
Some functions are very explicit about their dependency on other functions, for example running
Returns
However, there are several other functions such as
KmeanOrder
which have the same requirement, but are not explicit about it. RunningReturns
(apologies for the error in Nynorsk, the point is that the first argument is out of bounds).
The function is clearly expecting some other clustering function such as
clustexp
to be run beforehand.There are a few functions like this, and I can fix this by adding a similar validation algorithm to them as I go through the demo script, but I was wondering what this validation algo contains. Is it enough to check if
length(object@cpart) == 0
or should I be checking other slots? Isclustexp
the only clustering function that needs to be run before or are there alternatives?