[R] Bhattacharyya in R

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Mon Jul 1 23:35:39 CEST 2013

There is a built-in guide to syntax called the help system. If you have read it you should be able to be mitre specific with your questions.

I had never heard of this function. Your example code is not reproducible, nor does it indicate what result you got from running it.

I used


and there appears to be a function bhattacharyya.matrix in the fpc package. The syntax indicated in the help for that function mentions wanting input matrices, not vectors. It also mentions another function bhattacharyya.dist which does accept vectors, but it does not accept the misclassification.bound argument.

You should read the help file and ask more specific questions and provide reproducible examples per the Posting Guide recommendations.
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
Sent from my phone. Please excuse my brevity.

Dzu <dizem.uerek at alumni.fh-aachen.de> wrote:

>Dear R-user,
>I am trying to apply bhattacharyya-distance function to my data. Did
>use it before ?
>My code is the following
>#Bhattacharya Distance measure
>#a and b are vectors 
>a <- (1,2,3,4,2,2,2,2,2,2,2,1,4,5,6,-1,-1,-1,-1,-1,-3,-3,-3)
>b <-
>dist <- bhattacharyya.matrix(a,b, misclassification.bound = TRUE)
>Could somebody give me a guide on the syntax ?
>View this message in context:
>Sent from the R help mailing list archive at Nabble.com.
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list