Re: [R] Why is it not possible to cut a tree returned by Agnes or Diana by height?

2019-04-15 Thread Leszek Nowina
Bert Gunter > > > On Sun, Apr 14, 2019 at 4:12 PM Leszek Nowina wrote: >> >> > asdf = data.frame(x=c(1,2,3), y=c(4,5,6), z=c(7,8,9)) >> > cutree(agnes(asdf), h=100) >> Error in cutree(agnes(asdf), h = 100) : >> the 'height' comp

[R] Why is it not possible to cut a tree returned by Agnes or Diana by height?

2019-04-14 Thread Leszek Nowina
> asdf = data.frame(x=c(1,2,3), y=c(4,5,6), z=c(7,8,9)) > cutree(agnes(asdf), h=100) Error in cutree(agnes(asdf), h = 100) : the 'height' component of 'tree' is not sorted (increasingly) > cutree(diana(asdf), h=100) Error in cutree(diana(asdf), h = 100) : the 'height