Hi,

I am very new to R. I am planning to plot a dendrogram from a binary file
but received error after running it. I retrieved the code from the Internet
and customized it accordingly...

Error: Error in plot.window(...) : need finite 'xlim' values

Can you explain why and what should I do... Thank you :)

code:

# load required libraries
library(cluster) # clustering functions
library(ape) # plotting

# retrieve csv data
treePhone <- read.csv("J:/research/source/treePhone_binary.csv")

# combine into single data.frame
df_treePhone <- data.frame(treePhone)

d_treePhone <- daisy(df_treePhone)

# perform divisive hierarcical clustering for dendrogram creation
di_treePhone.diana <- diana(d_treePhone)

# convert object into 'phylo' class for plotting
p_treePhone.phylo <- as.phylo(as.hclust(di_treePhone.diana))

# plot dendrogram representation, annotated with the same labels
plot(p_treePhone.phylo)

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to