Entering edit mode
5.1 years ago
mohammedtoufiq91
▴
260
Hi,
I am using the ComplexHeatmap library to obtain the heatmap of the data. There are 19 rows (samples- different timepoints) and 264 genes (columns). There are few missing values in the data frame. I keep getting the below error message. Also attached is the screenshot of the data. Please assist me in resolving this error.
library(ComplexHeatmap)
library(circlize)
Neg_Dct <- read.csv(file = "./NegDCt_Subject_B1.csv",stringsAsFactors = FALSE)
## Check missing values ##
is.na(Neg_Dct)
## Create a data frame by ignoring columns 1 to 4- categorical data###
df = Neg_Dct[,-c(1:4)]
my_matrix <- as.matrix(df)
class(df)
[1] "data.frame"
class(my_matrix)
[1] "matrix"
Heatmap(my_matrix)
Error in hclust(get_dist(t(mat), distance), method = method) :
NA/NaN/Inf in foreign function call (arg 11)
Thank you very much @russhh.