Using your csv file, I get no error running the following code.
     SPIV2 <- read.csv("C:/Temp/SPI V2.csv")
     heatmap(as.matrix(SPIV2), na.rm=TRUE)
Perhaps you modified SPIV2 in some way prior to running heatmap()?

Jean




On Tue, Oct 22, 2013 at 10:29 AM, David Romero <drom...@mda.cinvestav.mx>wrote:

> Hi Jean****
>
> ** **
>
> Thank you for helping.****
>
> No, there is no empty column or row. I join the data base.****
>
> ** **
>
> Regards****
>
> ** **
>
> David****
>
> ** **
>
> ** **
>
> ** **
>
> *De:* Adams, Jean [mailto:jvad...@usgs.gov]
> *Enviado el:* 22 de octubre de 2013 07:03
> *Para:* David Romero
> *CC:* r-h...@stat.math.ethz.ch
> *Asunto:* Re: [R] Error in heatmap****
>
> ** **
>
> Do you have a row or column that is all missing?****
>
>      sum(apply(is.na(as.matrix(SPIV2)), 1, all)) > 0****
>
>      sum(apply(is.na(as.matrix(SPIV2)), 2, all)) > 0****
>
> ** **
>
> For example, this code****
>
>      m <- as.matrix(mtcars)****
>
>      m[8, ] <- NA****
>
>      heatmap(m, na.rm=TRUE)****
>
> throws this error****
>
>      Error in hclustfun(distfun(x)) : ****
>
>        NA/NaN/Inf in foreign function call (arg 11)****
>
> ** **
>
> Jean****
>
> ** **
>
> ** **
>
> On Mon, Oct 21, 2013 at 1:04 PM, David Romero <drom...@mda.cinvestav.mx>
> wrote:****
>
> Hi,
>
>
>
> Could you please help?
>
>
>
> Heatmap  doesn't work with:
>
>
>
> > heatmap(as.matrix(SPIV2),na.rm = T)
>
> Error in hclustfun(distfun(x)) :
>
>   NA/NaN/Inf in foreign function call (arg 11)
>
>
>
> There are no 0 data rows or column
>
>
>
> Thanks a lot
>
>
>
> Regards
>
> ---------------------------------------
>
> David
>
>
>
>
> ______________________________________________
> 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.****
>
> ** **
>

        [[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