[rkward-cvs] SF.net SVN: rkward:[3750] trunk/rkward/rkward/rbackend/rpackages/rkward/R/ rk.print-functions.R
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Sun Sep 11 18:08:15 UTC 2011
Revision: 3750
http://rkward.svn.sourceforge.net/rkward/?rev=3750&view=rev
Author: tfry
Date: 2011-09-11 18:08:14 +0000 (Sun, 11 Sep 2011)
Log Message:
-----------
Fix printing of column/row names for table data in rk.results()
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R 2011-09-11 17:01:02 UTC (rev 3749)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R 2011-09-11 18:08:14 UTC (rev 3750)
@@ -139,11 +139,11 @@
if (is.null(titles)) {
titles <- names(dimnames(x))
}
- rn <- c () # row names
- for (row in 1:rows) rn[row] <- paste (titles[1], "=", dimnames(x)[[1]][row])
- x <- data.frame (cbind (x))
+ rn <- paste (titles[1], "=", dimnames(x)[[1]])
+ titles <- c ("", paste (titles[2], "=", dimnames(x)[[2]]))
+ x <- data.frame (cbind (x), stringsAsFactors=FALSE)
rownames (x) <- as.character (rn)
- titles <- c ("", paste (titles[2], "=", names (internal)))
+ if (missing (print.rownames)) print.rownames <- TRUE
}
if (is.list (x)) { # or a data.frame
@@ -151,7 +151,7 @@
# by default, print rownames, unless they are just plain row numbering
if (missing (print.rownames)) print.rownames <- !isTRUE (all.equal (rownames (x), as.character (1:dim(x)[1])))
if (isTRUE (print.rownames)) {
- x <- cbind (rownames (x), x)
+ x <- cbind (rownames (x), x, stringsAsFactors=FALSE)
names (x)[1] <- '';
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list