Got it!
read.matrix("file") does the job!

Rob Hall

On Tue, Sep 22, 2009 at 3:27 PM, Robert Hall <hall.robert....@gmail.com>wrote:

> Ohh i forgot to mention one thing the value 'y' is obtained as follows:
>
> s1p5<-read.table("s1p5",header=TRUE)
> s2p5<-read.table("s2p5",header=TRUE)
>
> y<-cbind(s1p5,s2p5)
>
> I know the problem is that the value Y is not compatible with what KLdiv
> requires ..
> can anyone please tell how to build the distribution matrix y.
> s1p5 is variable reading from file "s1p5" this file contains 1 value at
> each row
> s2p5 is variable reading from file "s2p5" this file contains 1 value at
> each row
>
> I need to find KLdiv between these two variables s1p5 & s2p5.
>
> Rob Hall.
>
>
> On Tue, Sep 22, 2009 at 3:11 PM, Robert Hall <hall.robert....@gmail.com>wrote:
>
>> I am receiving the following error while executing KLdiv method:
>>
>> kl<-KLdiv(y)
>> Error in function (classes, fdef, mtable)  :
>>   unable to find an inherited method for function "KLdiv", for signature
>> "data.frame"
>>
>> the code is as follows:
>> require(flexmix)
>> KLdiv(y)
>>
>>
>> the object y (snippet, actual object contains 188 entries) is as follows:
>>
>>     s1p5 s2p5
>> 1    0.6  0.8
>> 2    0.8  0.2
>> 3    0.6  0.8
>> 4    0.2  0.0
>> 5    0.6  0.8
>> 6    0.6  0.4
>> 7    0.2  0.8
>> 8    1.0  0.0
>> 9    0.4  0.8
>> 10   0.4  0.4
>>
>> I tried searching in the R mail archives but could not get any convincing
>> answer.
>> Please help.
>> Thanks!
>>
>> Rob Hall.
>>
>
>

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