[R] Error on distance matrix

Marc Moragues Marc.Moragues at scri.ac.uk
Thu Jan 10 11:48:13 CET 2008


I am trying to calculate a distance matrix on a binary data frame using
dist.binary() {ade4}. This is the code I run and the error I get:

> sjlc.dist <- dist.binary(as.data.frame(data), method=2) #D = (a+d) /
Error in if (any(df < 0)) stop("non negative value expected in df") :
 missing value where TRUE/FALSE needed

I don't know if the problem are the missing values in my data. If so how
can I handle them?

Thank you,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

SCRI, Invergowrie, Dundee, DD2 5DA.  
The Scottish Crop Research Institute is a charitable company limited by guarantee. 
Registered in Scotland No: SC 29367.
Recognised by the Inland Revenue as a Scottish Charity No: SC 006662.


This email is from the Scottish Crop Research Institute, but the views 
expressed by the sender are not necessarily the views of SCRI and its 
subsidiaries.  This email and any files transmitted with it are confidential 
to the intended recipient at the e-mail address to which it has been 
addressed.  It may not be disclosed or used by any other than that addressee.
If you are not the intended recipient you are requested to preserve this 
confidentiality and you must not use, disclose, copy, print or rely on this 
e-mail in any way. Please notify postmaster at scri.ac.uk quoting the 
name of the sender and delete the email from your system.

Although SCRI has taken reasonable precautions to ensure no viruses are 
present in this email, neither the Institute nor the sender accepts any 
responsibility for any viruses, and it is your responsibility to scan the email 
and the attachments (if any).

More information about the R-help mailing list