Displaying 3 results from an estimated 3 matches for "makecolnames".
2008 Mar 10
2
write.table with row.names=FALSE unnecessarily slow?
...=====
--- write.table.R (revision 44717)
+++ write.table.R (working copy)
@@ -27,13 +27,18 @@
if(!is.data.frame(x) && !is.matrix(x)) x <- data.frame(x)
+ makeRownames <- is.logical(row.names) && !is.na(row.names) &&
+ row.names==TRUE
+ makeColnames <- is.logical(col.names) && !is.na(col.names) &&
+ col.names==TRUE
if(is.matrix(x)) {
## fix up dimnames as as.data.frame would
p <- ncol(x)
d <- dimnames(x)
if(is.null(d)) d <- list(NULL, NULL)
- if(is.n...
2018 Jul 05
0
write.table with quote=TRUE fails on nested data.frames
...;'quote' must be 'TRUE', 'FALSE' or numeric")
quoteC <- if (is.logical(quote))
quote
else TRUE
qset <- is.logical(quote) && quote
if (!is.data.frame(x) && !is.matrix(x))
x <- data.frame(x)
makeRownames <- isTRUE(row.names)
makeColnames <- is.logical(col.names) && !identical(FALSE,
col.names)
if (is.matrix(x)) {
p <- ncol(x)
d <- dimnames(x)
if (is.null(d))
d <- list(NULL, NULL)
if (is.null(d[[1L]]) && makeRownames)
d[[1...
2009 Aug 28
6
Google's R Style Guide
Perhaps most of you have already seen this?
http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html
Comments/Critiques?
Thanks,
Esmail
ps: Reminds me of PEP 8 for Python
http://www.python.org/dev/peps/pep-0008/
Maybe not that surprising since Python is also one of the main languages
used by Google.