-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
Description
Code example:
(source: andrie/ggdendro#27)
# URL containing the dput output
url <- "https://github.com/andrie/ggdendro/files/10493161/path_clust_dput.txt"
# Read the content from the URL
dput_content <- readLines(url, warn = FALSE)
# Convert the dput output into an R object
temp <- eval(parse(text = paste(dput_content, collapse = "\n")))
# View the structure of the resulting object
str(path_clust)
plot(temp)
library(dendextend)
library(ggplot2)
# Create a complex dend:
dend <-
# temp_data %>%
# dist() %>%
# hclust() %>%
temp %>%
as.dendrogram()
start.time <- Sys.time()
# # plot the dend in usual "base" plotting engine:
# plot(dend)
# Now let's do it in ggplot2 :)
ggd1 <- as.ggdend(dend)
ggplot(ggd1) # reproducing the above plot in ggplot2 :)
end.time <- Sys.time()
time.taken <- round(end.time - start.time,2)
time.taken #
output:
Error: C stack usage 7976184 is too close to the limit