Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recursion error in as.ggdend for very wide dendrograms #150

Open
talgalili opened this issue Nov 29, 2024 · 0 comments
Open

recursion error in as.ggdend for very wide dendrograms #150

talgalili opened this issue Nov 29, 2024 · 0 comments
Labels

Comments

@talgalili
Copy link
Owner

talgalili commented Nov 29, 2024

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

@talgalili talgalili added the bug label Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant