On 14-01-02 5:36 PM, Lars Bishop wrote:> Dear list,
>
> I'm most likely doing something wrong, but I'm getting an error
message in
> tab2 below (tab1 is fine). Any hint is much appreciated.
This was a bug in tables, which I've tracked down. I'll soon upload an
update to R-forge, later to CRAN. Look for a version number higher than
0.7.67.
Duncan Murdoch
>
> library(tables)
> set.seed(1)
> dd <- data.frame(x = rnorm(100), f1 = gl(2, 50, labels =
c("A", "B")),
> f2 = gl(4, 25, labels = c("a", "b",
"c", "d")),
> f3 = as.factor(sample(1:10, 100, replace = T)))
>
>
> tab1 <- tabular((n=1) + Format(digits=1) * ((x) * (Avg. = mean)) +
> Format(digits=4) * ((Factor(f1) + Factor(f2)) * (Pctn.
> Percent('col'))) ~
> Justify(c) * (f3 + 1), data = dd)
> tab1
>
> tab2 <- tabular((n=1) + Format(digits=1) * ((x) * (Avg. = mean)) +
> Format(digits=4) * ((Factor(f1)) * (Pctn. >
Percent('col'))) ~
> Justify(c) * (f3 + 1), data = dd)
> Error in justification[j, ] <- rightjustification :
> number of items to replace is not a multiple of replacement length
>
> Best,
> Lars.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>