genIndepTable {prob} | R Documentation |
A function to generate a two-way table with independent margins
genIndepTable(n = sample(100:500, size = 1), prow = 1:3, pcol = 1:4, dmnames = list(X = paste("x", 1:length(prow), sep = ""), Y = paste("y", 1:length(pcol), sep = "")), addmargins = TRUE, as.df = FALSE, untable = TRUE)
n |
sum total of observations generated |
prow |
nonnegative weights for the row marginal distribution |
pcol |
nonnegative weights for the col marginal distribution |
dmnames |
names for the table dimensions |
addmargins |
should margins be added to the table |
as.df |
should the result be returned as a data frame |
untable |
if true then data frame will be expanded to one observation per row |
This function will generate a two-way table with independent marginal distributions.
Either an object of class table or a data frame.
G. Jay Kerns