On Mon, 2009-07-27 at 16:34 -0300, Henrique Dallazuanna wrote:
> Try this:
>
> t1 <- prop.table(table(factor(c(0,0,2,4,4), levels = 0:4)))
> t2 <- prop.table(table(factor(c(0,2,2,2,3), levels = 0:4)))
Is there a way to do this given an already existing table? The problem
is that I actually build
Try this:
t1 <- prop.table(table(factor(c(0,0,2,4,4), levels = 0:4)))
t2 <- prop.table(table(factor(c(0,2,2,2,3), levels = 0:4)))
On Mon, Jul 27, 2009 at 4:21 PM, Andre Nathan wrote:
> Hello
>
> I'm trying to write a function to calculate the relative entropy between
> two distributions. The da
Hi Andre,
Just about expending the table,
The way you could do this is by using factors, for example:
t1 <- prop.table(table(factor(c(0,0,2,4,4
t2 <- prop.table(table(factor( c(0,2,2,2,3
The rest is for more knowledgeable people then me to say...
On Mon, Jul 27, 2009 at 10:21 PM, And
Hello
I'm trying to write a function to calculate the relative entropy between
two distributions. The data I have is in table format, for example:
> t1 <- prop.table(table(c(0,0,2,4,4)))
> t2 <- prop.table(table(c(0,2,2,2,3)))
> t1
0 2 4
0.4 0.2 0.4
> t2
0 2 3
0.2 0.6 0.2
The re
4 matches
Mail list logo