[BioC] KLdist function with unequal sample sizes

Wolfgang Huber huber at ebi.ac.uk
Fri May 15 13:49:25 CEST 2009

wrighth ha scritto:
> I¹m attempting to use the Kldist function to calculate distances between a
> couple of data sets which unfortunately have unequal sample sizes.
> Essentially, I¹ve gotten the data sets into two matrices with one feature
> type per column, so m1[,1] is the same data type as m2[,1]. The
> documentation for the function indicates that I need to get the columns into
> rows and then coerce them into list form; I¹ve tried:
> l1 <- list(t(m1[,1], t(m2[1,]))
> KLdist.matrix(l1)
> Which gives me back:
>               [,1]          [,2]
> [1,] -1.979871e-15  2.529427e-01
> [2,]  1.795909e-02 -1.503161e-15
> Which seems wrong. Shouldn¹t I be getting back a single KL distance between
> the samples? Am I constructing the list object incorrectly?
> Hollis Wright, MS
> PhD Candidate, DMICE
> Oregon Health and Science University
> 	[[alternative HTML version deleted]]
Dear Hollis

thank you for your feedback. I cannot comment on the substance of your 
query, but it is likely that you will get better answers by

(i) providing the output of sessionInfo()
(ii) providing a simple stand-alone code example that others can 
reproduce (without access to private objects in your workspace).

You could consult the posting guide for more details.

It also seems that the code example you give would never run, as it 
contains a Syntax error.

Best wishes

Wolfgang Huber, EMBL, http://www.ebi.ac.uk/huber

More information about the Bioconductor mailing list