R-philes,

I have a question about displaying counts of unused factors using the table() function. I have two vectors with character data in them:

local.labels("ah", "ah", "ah~")
local.preds("ah", "ah", "ah")

If I use the table function as shown below, I get an error because the number of levels do not match up.

v.cont.table <- table(local.labels, local.preds, dnn=c("observed", "predicted"));

Is there any way to get zero counts into the contingency table, or would I have to use a flat table? Any help with sample code, or a pointer to a previous post, would be much appreciated.

Regards,

Na'im

______________________________________________
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