[R] Objective: to create a Joint Probability Table

Roscoe Roscoe at Exemail.com.au
Tue May 4 08:16:36 CEST 2010


G'Day Ista,

Tuesday, May 4, 2010, 3:20:37 PM, you wrote:

> I couldn't make it though that excel worksheet without my eyes
> glazing over...

Heh, yeah, it is a bit long-winded. Essentially you take the input
data and run it through those steps to produce the JPT at the end.

Part of it is the odometric ordering of the data.

> but do you want something like

> data(mtcars)
> tab <- xtabs(~cyl + gear, data=mtcars)
> tab/sum(tab)

I don't think so, at least not exactly, but if I can get my head
around what that code does it might actually be doing what I want.

Thanks for that, I will attempt to break the R code down into chunks
that I can understand and go from there.


-- 
Kind regards,
 Roscoe                          mail to: Roscoe at Exemail.com.au



More information about the R-help mailing list