[R-gregmisc-users] SF.net SVN: r-gregmisc: [1213] trunk/gplots
Brought to you by:
warnes
From: <wa...@us...> - 2007-11-01 20:20:11
|
Revision: 1213 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1213&view=rev Author: warnes Date: 2007-11-01 13:20:10 -0700 (Thu, 01 Nov 2007) Log Message: ----------- in textplot(), convert tab characters to spaces before processing to avoid problems with computing height and width of text including tabs when using pdf() Modified Paths: -------------- trunk/gplots/ChangeLog trunk/gplots/DESCRIPTION trunk/gplots/R/textplot.R Added Paths: ----------- trunk/gplots/R/replaceTabs.R Modified: trunk/gplots/ChangeLog =================================================================== --- trunk/gplots/ChangeLog 2007-11-01 20:18:30 UTC (rev 1212) +++ trunk/gplots/ChangeLog 2007-11-01 20:20:10 UTC (rev 1213) @@ -1,3 +1,92 @@ +2007-11-01 20:18 warnes + + * R/overplot.R, man/overplot.Rd: Minor reformatting of overplot + code and docs + +2007-10-22 02:24 warnes + + * branches/GenerateFORMATSfromFactorObjects/SASxport/DESCRIPTION, + trunk/MSOfficeUtil/DESCRIPTION, trunk/RMCMC/DESCRIPTION, + trunk/Rlsf/DESCRIPTION, trunk/SASxport/DESCRIPTION, + trunk/bwRF/DESCRIPTION, trunk/exp.ssize/DESCRIPTION, + trunk/fork/DESCRIPTION, trunk/gdata/DESCRIPTION, + trunk/gmodels/DESCRIPTION, DESCRIPTION, + trunk/gregmisc/DESCRIPTION, trunk/ssize/DESCRIPTION: Clarify GPL + version + +2007-08-14 19:14 warnes + + * R/balloonplot.R: Correct error in balloonplot when z contains NA + values. + +2007-08-14 18:48 warnes + + * R/balloonplot.R, man/balloonplot.Rd: Augment balloonplot() with + control of character size and color for text and label items + +2007-08-14 18:11 warnes + + * R/balloonplot.R: Correct balloonplot.default to properly show + specified x and y axis labels when explicitly provided + +2007-03-09 09:05 ggorjan + + * man/ooplot.Rd: use of \method in Rd markup - issues a warning + with _R_CHECK_RD_STYLE_=TRUE env. variable with R 2.5.0 + +2007-02-08 23:05 warnes + + * DESCRIPTION: Bump version number + +2007-02-08 22:03 warnes + + * man/textplot.Rd: Update documentation for textplot() + +2007-02-08 21:56 warnes + + * R/col2hex.R, man/col2hex.Rd: Add col2rgb() function to convert + color names to rgb hex codes + +2007-02-08 21:32 warnes + + * R/textplot.R: Add paramaeters 'col.data', 'col.rows', and + 'col.columns' to + textplot.matrix to allow specification of the color of the matrix + data, rows, and columns. + +2007-02-08 16:56 warnes + + * R/bandplot.R: Add parameters to control line width and line type. + +2006-11-14 22:25 ggorjan + + * trunk/gdata/man/combine.Rd, trunk/gdata/man/frameApply.Rd, + trunk/gmodels/R/ci.R, trunk/gmodels/R/fast.prcomp.R, + trunk/gmodels/man/ci.Rd, R/bandplot.R, R/boxplot.n.R, R/lowess.R, + R/plot.lm.R, R/plotCI.R, R/plotmeans.R, R/residplot.R, + R/wapply.R, man/boxplot.n.Rd, man/plotCI.Rd, man/plotmeans.Rd, + trunk/gtools/R/combinations.R, trunk/gtools/R/running.R, + trunk/gtools/man/ELISA.Rd, trunk/gtools/man/combinations.Rd: + Removed executable property + +2006-11-14 18:29 warnes + + * tests/heatmap2Test.Rout.save: Update output file to match + (trivial) changes in the test code. + +2006-11-14 18:07 warnes + + * ChangeLog, NEWS: Update ChangeLog and NEWS files for release + 2.3.2. + +2006-11-14 17:59 warnes + + * DESCRIPTION: Update version number + +2006-11-14 17:57 warnes + + * DESCRIPTION: Update version number and maintainer + 2006-11-14 17:56 warnes * man/heatmap.2.Rd: Correct problem with labeled correlation matrix Modified: trunk/gplots/DESCRIPTION =================================================================== --- trunk/gplots/DESCRIPTION 2007-11-01 20:18:30 UTC (rev 1212) +++ trunk/gplots/DESCRIPTION 2007-11-01 20:20:10 UTC (rev 1213) @@ -4,7 +4,7 @@ Depends: R (>= 1.9.0), gtools, gdata, stats Recommends: datasets Suggests: gtools, gdata -Version: 2.4.0 +Version: 2.4.1 Author: Gregory R. Warnes. Includes R source code and/or documentation contributed by Ben Bolker and Thomas Lumley Maintainer: Gregory R. Warnes <wa...@bs...> Added: trunk/gplots/R/replaceTabs.R =================================================================== --- trunk/gplots/R/replaceTabs.R (rev 0) +++ trunk/gplots/R/replaceTabs.R 2007-11-01 20:20:10 UTC (rev 1213) @@ -0,0 +1,35 @@ +## Function to replace all tabs in a string with an appropriate number of spaces. + +# handle a single character string +replaceTabs.inner <- function( text, width=8 ) +{ + spaces <- " " + + if(nchar(text)<1) return(text) + + text.split <- strsplit(text,"\t")[[1]] + if(length(text.split)==1) + return(text) + else + { + nSpaceAdd <- 8 - nchar(text.split) %% 8 + nSpaceAdd[length(nSpaceAdd)] <- 0 + nSpaceAdd[nSpaceAdd==8] <- 0 + + retval <- "" + for(i in 1:length(text.split)) + { + tmp.text <- chartr("\t"," ", text.split[i]) # one space here + retval <- paste(retval, tmp.text, substr(spaces,0,nSpaceAdd[i]-1 ), sep='' ) # rest here + } + return(retval) + } +} + +replaceTabs <- function(text, width=8) +{ + text <- as.character(text) + retval <- sapply(text, replaceTabs.inner) + names(retval) <- names(text) + retval +} Modified: trunk/gplots/R/textplot.R =================================================================== --- trunk/gplots/R/textplot.R 2007-11-01 20:18:30 UTC (rev 1212) +++ trunk/gplots/R/textplot.R 2007-11-01 20:20:10 UTC (rev 1213) @@ -182,9 +182,11 @@ cspace=1, lspace=1, mar=c(0,0,3,0)+0.1, + tab.width=8, ...) { object <- paste(object,collapse="\n",sep="") + object <- replaceTabs(object, width=tab.width) halign = match.arg(halign) valign = match.arg(valign) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |