search for: nocols

Displaying 5 results from an estimated 5 matches for "nocols".

Did you mean: ncols
2009 Aug 17
1
image() generates many border lines in pdf, not on screen (quartz) - R 2.9.1 GUI 1.28 Tiger build 32-bit (5444) - OS X 10.5.8
...read on this issue, including R mailing lists (e.g. http://finzi.psych.upenn.edu/R/Rhelp02/archive/30588.html), e.g. if someone claims those lines would not matter and go away when printing. In my case they don't. BTW, my image() statement looks like this: image(rfc, y, -t(zVals), zlim=c(-noCols-0.5,0.5), col = heat.colors(noCols), axes=F, add=T) where z is a 127 x 3 matrix. Since I need high resolution variants for final publication I need to know whether it is possible to force image() to give up drawing these borders (I tried already several low level par parameters, all to no ava...
2009 Feb 09
2
R equivalent of SAS Cochran-Mantel-Haenszel tests?
In SAS, for a two-way (or 3-way, stratified) table, the CMH option in SAS PROC FREQ gives 3 tests that take ordinality of the factors into account, for both variables, just the column variable or neither. Is there an equivalent in R? The mantelhaen.test in stats gives something quite different (a test of conditional independence for *nominal* factors in a 3-way table). e.g. I'd like to
2008 Mar 10
2
write.table with row.names=FALSE unnecessarily slow?
...e[quote > 0] } } - d <- dimnames(x) - if(is.null(d[[1]])) d[[1]] <- seq_len(nrow(x)) + d <- list(if (makeRownames==TRUE) row.names(x) else NULL, + if (makeColnames==TRUE) names(x) else NULL) p <- ncol(x) } nocols <- p==0 improves performance at least in proportion to nrow(x): > system.time({ + write.table(df, '/tmp/dftest1.txt', row.names=FALSE) + }, gcFirst=TRUE) user system elapsed 8.132 0.608 8.899 Martin -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Re...
2018 Jul 05
0
write.table with quote=TRUE fails on nested data.frames
...se { if (qset) quote <- if (length(x)) which(unlist(lapply(x, function(x) is.character(x) || is.factor(x)))) else numeric() d <- list(if (makeRownames) row.names(x), if (makeColnames) names(x)) } p <- ncol(x) } nocols <- p == 0L if (is.logical(quote)) quote <- NULL else if (is.numeric(quote)) { if (any(quote < 1L | quote > p)) stop("invalid numbers in 'quote'") } else stop("invalid 'quote' specification") rn <- FALSE rnames <- NULL...
2007 Nov 22
5
testing independence of categorical variables
hi, is there a way of calculating of measuring dependence between two categorical variables. i tried using the chi square test to test for independence but i got error saying that the lengths of the two vectors don't match. Suppose X and Y are two factors. X has 5 levels and Y has 7 levels. This is what i tried doing >temp<-chisq.test(x,y) but got error "the lengths of the two