I forgot to say what 'rmNames' is:
rmNames <- function(x) {x[c(FALSE, x[-1]==x[-length(x)])] <- ""; x}
With
rmNames <- function(x) {x[c(FALSE, x[-1]==x[-length(x)])] <- NA; x}
the option na.blank=TRUE works as expected. Also, the two empty columns are
inserted due to "cgroup", but I don't k
Dear expeRts,
Why does na.blank=TRUE not replace the NA's in the following LaTeX table?
x <- matrix(1:72, ncol=4, nrow=8)
colnames(x) <- c("gr1.sgr1", "gr1.sgr2", "gr2.sgr1", "gr2.sgr2")
rn <- apply(expand.grid(beta=c(0.25, 0.75), n=c(100, 500), d=c(10, 100))[,
3:1], 2, rmNames)
x <- cbind(rn, x
2 matches
Mail list logo