hclust 개체에서 "하위 트리"를 만들고 싶습니다.거기 hclust에서 "하위 트리"를 얻을 수있는 방법은 무엇입니까? (R)
가내가 그것을 어떻게
a <- list() # initialize empty object
a$merge <- matrix(c(-1, -2,
-3, -4,
1, 2
), nc=2, byrow=TRUE)
a$height <- c(1, 1.5, 3) # define merge heights
a$order <- 1:4 # order of leaves(trivial if hand-entered)
a$labels <- 1:4# LETTERS[1:4] # labels of leaves
class(a) <- "hclust" # make it an hclust object
plot(a) # look at the result
을 에 액세스 할 수 :
a <- list() # initialize empty object
a$merge <- matrix(c(-1, -2,
-3, -4,
1, 2,
-5,-6,
3,4), nc=2, byrow=TRUE)
a$height <- c(1, 1.5, 3,4,4.5) # define merge heights
a$order <- 1:6 # order of leaves(trivial if hand-entered)
a$labels <- 1:6# LETTERS[1:4] # labels of leaves
class(a) <- "hclust" # make it an hclust object
plot(a) # look at the result
가 지금은 그것에서 추출에게 다음과 같은 하위 트리를 기원합니다 : 예를 들어
, 이제 나는 다음과 같은 객체가 있다고 가정 해 보자?
는
내가 찾고있는 것. 고마워 니코. –