[R] Outer function in R

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Tue Jul 2 19:25:20 CEST 2013


Read the Posting Guide. The example you provide below is not reproducible [1], so we cannot tell what you're giving to the outer() function.

[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---------------------------------------------------------------------------
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 members 
>
>I am trying to apply the function kl.dist (Kullback-Leibler Distance
>measure) to multiple matrixes.
>
>I tried the following : 
>
>veckldist <- Vectorize(kl.dist)
>distancematrix <- outer (matrix1,matrix2, "veckldist")
>
>
>But the code is complaining that the list of the object does not match.
>The
>lengths of my matrixes are same 
>
>How could I fix the error?
>
>Thanks
>
>
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/Outer-function-in-R-tp4670738.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>R-help at 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.



More information about the R-help mailing list