Hi all,
I get the following Error:
Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1)
I'm trying to make a heatmap (pheatmap package) using K means. I have a large matrix (x) and I did the following:
x[x < 0] <- NA
x2 <- x[complete.cases(x),]
RedBlue <- colorRampPalette(c("blue", "white", "red")) (20)
pheatmap(x2, scale="row", kmeans_k=100, cluster_rows=TRUE, cluster_cols=TRUE, clustering_method = "ward.D2",color=RedBlue, legend=FALSE, show_colnames=TRUE, fontsize=15, fontface="bold", border_color=NA, width=20, heigth=100, cellwidth=30, cellheight = 5, show_rownames = FALSE, filename = "Heatmap.tiff")
I checked for NA/NaN/Inf but I don't have this is my matrix. What can be another reason for this error?
Thanks!
I'm very sorry for the incomplete example on the wrong channel. I'm new to this. Thank you anyway for helping me. Removing rows with zero-variance solved the problem for me. Thanks!