[R] Error in heatmap()

Wolfgang Huber huber at ebi.ac.uk
Sat Jan 20 21:10:01 CET 2007


Dear Yuhong,

heatmap deals gracefully with sparse occurences of NA in the matrix, but 
will fail if whole rows or columns are NA. Try preprocessing your xx as 
follows:

xx = xx[rowSums(!is.na(x))!=0, colSums(!is.na(x))!=0]

  Best wishes
   Wolfgang

------------------------------------------------------------------
Wolfgang Huber  EBI/EMBL  Cambridge UK  http://www.ebi.ac.uk/huber

> Hi, 
> 
>  
> 
> I run into following error when using heatmap() for data matrix "xx".
> Any help is appreciated? "xx" contains many "NA"s.
> 
>  
> 
>> hv <- heatmap(data.matrix(xx))
> 
> Error in hclustfun(distfun(if (symm) x else t(x))) : 
> 
>         NA/NaN/Inf in foreign function call (arg 11)
> 
>  
> 
> Thanks a lot.
> 
>  
> 
> Yuhong
>



More information about the R-help mailing list