r-gregmisc-users Mailing List for R gregmisc package (Page 28)
Brought to you by:
warnes
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
(12) |
Apr
(5) |
May
(3) |
Jun
(5) |
Jul
(2) |
Aug
(5) |
Sep
(7) |
Oct
(15) |
Nov
(34) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(3) |
Feb
(16) |
Mar
(28) |
Apr
(5) |
May
|
Jun
(5) |
Jul
(9) |
Aug
(50) |
Sep
(29) |
Oct
(9) |
Nov
(25) |
Dec
(7) |
2008 |
Jan
(6) |
Feb
(4) |
Mar
(5) |
Apr
(8) |
May
(26) |
Jun
(11) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(9) |
2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
(26) |
Jun
|
Jul
(10) |
Aug
(6) |
Sep
|
Oct
(7) |
Nov
(3) |
Dec
(2) |
2010 |
Jan
(45) |
Feb
(11) |
Mar
|
Apr
(1) |
May
(8) |
Jun
(7) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(9) |
Dec
(1) |
2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(14) |
Sep
(29) |
Oct
(3) |
Nov
|
Dec
(3) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(6) |
Jun
(59) |
Jul
|
Aug
(8) |
Sep
(21) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
|
Mar
(10) |
Apr
|
May
(18) |
Jun
(25) |
Jul
(18) |
Aug
(1) |
Sep
(6) |
Oct
(28) |
Nov
(4) |
Dec
(13) |
2014 |
Jan
(7) |
Feb
(5) |
Mar
(4) |
Apr
(36) |
May
(3) |
Jun
(7) |
Jul
(46) |
Aug
(14) |
Sep
(12) |
Oct
(2) |
Nov
|
Dec
(12) |
2015 |
Jan
(4) |
Feb
|
Mar
|
Apr
(80) |
May
(36) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <wa...@us...> - 2009-05-09 03:15:18
|
Revision: 1326 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1326&view=rev Author: warnes Date: 2009-05-09 03:15:10 +0000 (Sat, 09 May 2009) Log Message: ----------- Move actual NEWS file into inst. Added Paths: ----------- trunk/gtools/inst/ trunk/gtools/inst/NEWS Removed Paths: ------------- trunk/gtools/NEWS Deleted: trunk/gtools/NEWS =================================================================== --- trunk/gtools/NEWS 2009-05-09 03:13:19 UTC (rev 1325) +++ trunk/gtools/NEWS 2009-05-09 03:15:10 UTC (rev 1326) @@ -1,78 +0,0 @@ -gtools 2.5.0 ------------- - -New features: - -- Add checkRVersion() function to determin if a newer version of R is - available. - -- Deprecated assert() in favor of base::stopifnot - -Bug fixes: - -- Fix bug in binsearch() identified by 2.6.0 R CMD CHECK - -Other changes: - -- Improve text explanation of how defmacro() and strmacro() differ from - function(). - -- Update definitions of odd() and even() to use modulus operator - instead of division. - -gtools 2.4.0 ------------- - -- Add binsearch() function, previously in the genetics() package. - - -gtools 2.3.1 ------------- - -- Add ask() function to prompt the user and collect a single response. - - -gtools 2.3.0 ------------- - -- Update email address for Greg - -- Add new 'smartbind' function, which combines data frames - efficiently, even if they have different column names. - -gtools 2.2.3 ------------- - - - setTCPNoDelay now compiles & works properly on Windows - - -gtools 2.2.2 ------------- - - - src/setTCPNoDelay.c: Add C source code for setTCPNoDelay. - - - NAMESPACE: Add UseDynLib to NAMESPACE so the shared library gets - properly loaded. - - - Updated Greg's email address. - -gtools 2.2.1 ------------- - - - New function 'addLast' that adds functions to R's .Last() so - that they will be executed when R is terminating. - - - New function setTCPNoDelay() that allows the TCP_NODELAY flag to - be changed on socket objects. - -gtools 2.1.0 ------------- - - - Added assert.R (and documentation) - - - Added the defmacro() function, extracted from Lumley T. "Programmer's Niche: - Macros in {R}", R News, 2001, Vol 1, No. 3, pp 11--13, - \url{http://CRAN.R-project.org/doc/Rnews/} - - - Added DESCRIPTION and removed DESCRIPTION.in - Copied: trunk/gtools/inst/NEWS (from rev 1324, trunk/gtools/NEWS) =================================================================== --- trunk/gtools/inst/NEWS (rev 0) +++ trunk/gtools/inst/NEWS 2009-05-09 03:15:10 UTC (rev 1326) @@ -0,0 +1,78 @@ +gtools 2.5.0 +------------ + +New features: + +- Add checkRVersion() function to determin if a newer version of R is + available. + +- Deprecated assert() in favor of base::stopifnot + +Bug fixes: + +- Fix bug in binsearch() identified by 2.6.0 R CMD CHECK + +Other changes: + +- Improve text explanation of how defmacro() and strmacro() differ from + function(). + +- Update definitions of odd() and even() to use modulus operator + instead of division. + +gtools 2.4.0 +------------ + +- Add binsearch() function, previously in the genetics() package. + + +gtools 2.3.1 +------------ + +- Add ask() function to prompt the user and collect a single response. + + +gtools 2.3.0 +------------ + +- Update email address for Greg + +- Add new 'smartbind' function, which combines data frames + efficiently, even if they have different column names. + +gtools 2.2.3 +------------ + + - setTCPNoDelay now compiles & works properly on Windows + + +gtools 2.2.2 +------------ + + - src/setTCPNoDelay.c: Add C source code for setTCPNoDelay. + + - NAMESPACE: Add UseDynLib to NAMESPACE so the shared library gets + properly loaded. + + - Updated Greg's email address. + +gtools 2.2.1 +------------ + + - New function 'addLast' that adds functions to R's .Last() so + that they will be executed when R is terminating. + + - New function setTCPNoDelay() that allows the TCP_NODELAY flag to + be changed on socket objects. + +gtools 2.1.0 +------------ + + - Added assert.R (and documentation) + + - Added the defmacro() function, extracted from Lumley T. "Programmer's Niche: + Macros in {R}", R News, 2001, Vol 1, No. 3, pp 11--13, + \url{http://CRAN.R-project.org/doc/Rnews/} + + - Added DESCRIPTION and removed DESCRIPTION.in + Property changes on: trunk/gtools/inst/NEWS ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:mergeinfo + Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2009-05-09 03:13:26
|
Revision: 1325 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1325&view=rev Author: warnes Date: 2009-05-09 03:13:19 +0000 (Sat, 09 May 2009) Log Message: ----------- Update Greg's email address and fix Rd syntax errors Modified Paths: -------------- trunk/gtools/DESCRIPTION trunk/gtools/man/addLast.Rd trunk/gtools/man/binsearch.Rd trunk/gtools/man/capture.Rd trunk/gtools/man/combinations.Rd trunk/gtools/man/defmacro.Rd trunk/gtools/man/dirichlet.Rd trunk/gtools/man/foldchange.Rd trunk/gtools/man/gtools-deprecated.Rd trunk/gtools/man/invalid.Rd trunk/gtools/man/logit.Rd trunk/gtools/man/mixedsort.Rd trunk/gtools/man/oddeven.Rd trunk/gtools/man/permute.Rd trunk/gtools/man/quantcut.Rd trunk/gtools/man/running.Rd trunk/gtools/man/scat.Rd trunk/gtools/man/setTCPNoDelay.Rd trunk/gtools/man/smartbind.Rd Modified: trunk/gtools/DESCRIPTION =================================================================== --- trunk/gtools/DESCRIPTION 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/DESCRIPTION 2009-05-09 03:13:19 UTC (rev 1325) @@ -1,9 +1,9 @@ Package: gtools Title: Various R programming tools Description: Various R programming tools -Version: 2.6.0 -Date: 2008-08-15 +Version: 2.6.1 +Date: 2009-05-08 Author: Gregory R. Warnes. Includes R source code and/or documentation contributed by Ben Bolker and Thomas Lumley -Maintainer: Gregory R. Warnes <wa...@bs...> +Maintainer: Gregory R. Warnes <gr...@ra...> License: LGPL-2.1 Modified: trunk/gtools/man/addLast.Rd =================================================================== --- trunk/gtools/man/addLast.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/addLast.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -20,7 +20,7 @@ \value{ None. } -\author{Gregory R. Warnes \email{wa...@bs...}} +\author{Gregory R. Warnes \email{gr...@ra...}} \seealso{ \code{\link[base]{.Last}} } \examples{ Modified: trunk/gtools/man/binsearch.Rd =================================================================== --- trunk/gtools/man/binsearch.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/binsearch.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -41,7 +41,7 @@ and the function value at both are returned. Note that when the specified target value falls between integers, the - \em{two} closest values are returned. If the specified target falls + \emph{two} closest values are returned. If the specified target falls outside of the specified \code{range}, the closest endpoint of the range will be returned, and an warning message will be generated. If the maximum number if iterations was reached, the endpoints of the @@ -60,7 +60,7 @@ \code{where}.} } %\references{ ~put references to the literature/web site here ~ } -\author{Gregory R. Warnes \email{wa...@bs...} } +\author{Gregory R. Warnes \email{gr...@ra...} } \note{This function often returns two values for \code{where} and \code{value}. Be sure to check the \code{flag} parameter to see what these values mean.} Modified: trunk/gtools/man/capture.Rd =================================================================== --- trunk/gtools/man/capture.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/capture.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -30,8 +30,11 @@ \section{WARNING}{R 1.7.0+ includes \code{capture.output}, which duplicates the functionality of \code{capture}. Thus, \code{capture} is depreciated.} -\author{Gregory R. Warnes \email{wa...@bs...} } -\seealso{\code{\link[session]{texteval}}, \code{\link[base]{capture.output}}}} +\author{Gregory R. Warnes \email{gr...@ra...} } +\seealso{ + \code{\link[session]{texteval}}, + \code{\link[base]{capture.output}} +} \examples{ # capture the results of a loop Modified: trunk/gtools/man/combinations.Rd =================================================================== --- trunk/gtools/man/combinations.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/combinations.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -40,7 +40,7 @@ \author{ Original versions by Bill Venables \email{Bil...@cm...}. Extended to handle \code{repeats.allowed} by Gregory R. Warnes - \email{wa...@bs...}. + \email{gr...@ra...}. } \seealso{ \code{\link[base]{choose}}, \code{\link[base]{options}} } \examples{ Modified: trunk/gtools/man/defmacro.Rd =================================================================== --- trunk/gtools/man/defmacro.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/defmacro.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -60,11 +60,11 @@ \references{ The original \code{defmacro} code was directly taken from: - Lumley T. "Programmer's Niche: Macros in {R}", R News, 2001, Vol 1, + Lumley T. "Programmer's Niche: Macros in R", R News, 2001, Vol 1, No. 3, pp 11--13, \url{http://CRAN.R-project.org/doc/Rnews/} } \author{ Thomas Lumley wrote \code{defmacro}. Gregory R. Warnes - \email{wa...@bs...} enhanced it and created + \email{gr...@ra...} enhanced it and created \code{strmacro}. } \seealso{ Modified: trunk/gtools/man/dirichlet.Rd =================================================================== --- trunk/gtools/man/dirichlet.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/dirichlet.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -36,7 +36,7 @@ \url{http://www.r-project.org/nocvs/mail/r-help/2000/3865.html}. Ben attributed the code to Ian Wilson \email{i.w...@ma...}. Subsequent modifications by Gregory R. Warnes - \email{wa...@bs...}. + \email{gr...@ra...}. } \seealso{ \code{\link{dbeta}}, \code{\link{rbeta}} } \examples{ Modified: trunk/gtools/man/foldchange.Rd =================================================================== --- trunk/gtools/man/foldchange.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/foldchange.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -37,7 +37,7 @@ A vector or matrix of the same dimensions as the input containing the converted values. } -\author{ Gregory R. Warnes \email{wa...@bs...} } +\author{ Gregory R. Warnes \email{gr...@ra...} } \examples{ a <- 1:21 Modified: trunk/gtools/man/gtools-deprecated.Rd =================================================================== --- trunk/gtools/man/gtools-deprecated.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/gtools-deprecated.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -19,6 +19,6 @@ \code{assert} is a deprecated synonym for \code{\link[base]{stopifnot}}. } \seealso{ - \code{\link{Deprecated}} } + \code{\link{Deprecated}} } \keyword{misc} Modified: trunk/gtools/man/invalid.Rd =================================================================== --- trunk/gtools/man/invalid.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/invalid.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -17,7 +17,7 @@ \value{ Logical value. } -\author{Gregory R. Warnes \email{wa...@bs...} } +\author{Gregory R. Warnes \email{gr...@ra...} } \seealso{ \code{\link[base]{missing}}, \code{\link[base]{is.na}}, \code{\link[base]{is.null}} } \examples{ Modified: trunk/gtools/man/logit.Rd =================================================================== --- trunk/gtools/man/logit.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/logit.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -42,7 +42,7 @@ \value{ Transformed value(s). } -\author{ Gregory R. Warnes \email{wa...@bs...} } +\author{ Gregory R. Warnes \email{gr...@ra...} } \seealso{ \code{\link[car]{logit}}, \code{\link[moc]{inv.glogit}} } \examples{ Modified: trunk/gtools/man/mixedsort.Rd =================================================================== --- trunk/gtools/man/mixedsort.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/mixedsort.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -36,7 +36,7 @@ \code{mixedorder} returns a vector giving the sort order of the input elements. \code{mixedsort} returns the sorted vector. } -\author{ Gregory R. Warnes \email{wa...@bs...} } +\author{ Gregory R. Warnes \email{gr...@ra...} } \seealso{ \code{\link[base]{sort}}, \code{\link[base]{order}} } \examples{ # compound & dose labels Modified: trunk/gtools/man/oddeven.Rd =================================================================== --- trunk/gtools/man/oddeven.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/oddeven.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -17,7 +17,7 @@ \value{ Vector of TRUE/FALSE values. } -\author{ Gregory R. Warnes \email{wa...@bs...}} +\author{ Gregory R. Warnes \email{gr...@ra...}} \seealso{ \code{\link[base]{round}} } \examples{ Modified: trunk/gtools/man/permute.Rd =================================================================== --- trunk/gtools/man/permute.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/permute.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -18,7 +18,7 @@ \value{ Vector with the original items reordered. } -\author{ Gregory R. Warnes \email{wa...@bs...} } +\author{ Gregory R. Warnes \email{gr...@ra...} } \seealso{ \code{\link{sample}} } \examples{ Modified: trunk/gtools/man/quantcut.Rd =================================================================== --- trunk/gtools/man/quantcut.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/quantcut.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -3,7 +3,7 @@ \name{quantcut} \alias{quantcut} -\title{ Create a Factor Variable Using the Quantiles of a Continuous Variable}} +\title{ Create a Factor Variable Using the Quantiles of a Continuous Variable} \description{ Create a factor variable using the quantiles of a continous variable. } @@ -34,7 +34,7 @@ Factor variable with one level for each quantile interval given by \code{q}. } -\author{Gregory R. Warnes \email{wa...@bs...}} +\author{Gregory R. Warnes \email{gr...@ra...}} \seealso{ \code{\link{cut}}, \code{\link{quantile}} } Modified: trunk/gtools/man/running.Rd =================================================================== --- trunk/gtools/man/running.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/running.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -55,7 +55,7 @@ Note that this function will create a vector or matrix even for objects which are not simplified by \code{sapply}. } -\author{ Gregory R. Warnes \email{wa...@bs...}, +\author{ Gregory R. Warnes \email{gr...@ra...}, with contributions by Nitin Jain \email{nit...@pf...}.} \seealso{ \code{\link[gplots]{wapply}} to apply a function over an x-y window centered at each x point, \code{\link[base]{sapply}}, Modified: trunk/gtools/man/scat.Rd =================================================================== --- trunk/gtools/man/scat.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/scat.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -18,7 +18,7 @@ \value{ NULL (invisibly) } -\author{Gregory R. Warnes \email{wa...@bs...}} +\author{Gregory R. Warnes \email{gr...@ra...}} \seealso{ \code{\link[base]{cat}}} \examples{ options(DEBUG=NULL) # makee sure DEBUG isn't set Modified: trunk/gtools/man/setTCPNoDelay.Rd =================================================================== --- trunk/gtools/man/setTCPNoDelay.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/setTCPNoDelay.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -26,8 +26,6 @@ This function allows this feature to be disabled (de-Nagling, \code{value=TRUE}) or enabled (Nagling, \code{value=FALSE}) for the specified socket. - } - } \value{ The character string "SUCCESS" will be returned invisible if the @@ -41,7 +39,7 @@ Request for Comments 896, January 1984. \url{http://www.ietf.org/rfc/rfc0896.txt?number=896} } -\author{Gregory R. Warnes \email{wa...@bs...}} +\author{Gregory R. Warnes \email{gr...@ra...}} \seealso{ \code{\link[utils]{make.socket}}, \code{\link[utils]{socketConnection}} Modified: trunk/gtools/man/smartbind.Rd =================================================================== --- trunk/gtools/man/smartbind.Rd 2009-05-08 23:07:20 UTC (rev 1324) +++ trunk/gtools/man/smartbind.Rd 2009-05-09 03:13:19 UTC (rev 1325) @@ -22,7 +22,7 @@ character strings. The user will need to coerce such character columns into an appropriate type. } -\author{Gregory R. Warnes \email{wa...@bs...}} +\author{Gregory R. Warnes \email{gr...@ra...}} \seealso{ \code{\link{rbind}}, \code{\link{cbind}} } \examples{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2009-05-08 23:07:28
|
Revision: 1324 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1324&view=rev Author: warnes Date: 2009-05-08 23:07:20 +0000 (Fri, 08 May 2009) Log Message: ----------- Add test of using a dendrogram created by heatmap() with heatmap.2() Added Paths: ----------- trunk/gplots/tests/heatmap_to_heatmap.2_test.R Added: trunk/gplots/tests/heatmap_to_heatmap.2_test.R =================================================================== --- trunk/gplots/tests/heatmap_to_heatmap.2_test.R (rev 0) +++ trunk/gplots/tests/heatmap_to_heatmap.2_test.R 2009-05-08 23:07:20 UTC (rev 1324) @@ -0,0 +1,16 @@ +library(gplots) +data(mtcars) + +x <- as.matrix(mtcars) + +## draws expected image +testHeatmap <- heatmap(x, Colv=NA, col=bluered(256), scale="column", + keep.dendro=TRUE) + +# to prove this dendro is OK, redraw with same function: +heatmap(x, Colv=NA, col=bluered(256), scale="column", + keep.dendro=TRUE, Rowv=testHeatmap$Rowv) + +# but it doesn't work with heatmap.2() +heatmap.2(x, Colv=NA, col=bluered(256), scale="column", + Rowv=testHeatmap$Rowv, dendrogram="row") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2009-05-08 22:51:25
|
Revision: 1323 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1323&view=rev Author: warnes Date: 2009-05-08 22:51:07 +0000 (Fri, 08 May 2009) Log Message: ----------- heatmap.2: handle NA for RowV or ColV the same way as NULL Modified Paths: -------------- trunk/gplots/R/heatmap.2.R Modified: trunk/gplots/R/heatmap.2.R =================================================================== --- trunk/gplots/R/heatmap.2.R 2009-05-08 22:35:25 UTC (rev 1322) +++ trunk/gplots/R/heatmap.2.R 2009-05-08 22:51:07 UTC (rev 1323) @@ -103,9 +103,9 @@ ## key=FALSE ## } - if ( is.null(Rowv) ) + if ( is.null(Rowv) || is.na(Rowv) ) Rowv <- FALSE - if ( is.null(Colv) ) + if ( is.null(Colv) || is.na(Colv) ) Colv <- FALSE else if( Colv=="Rowv" && !isTRUE(Rowv) ) Colv <- FALSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2009-05-08 22:35:55
|
Revision: 1322 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1322&view=rev Author: warnes Date: 2009-05-08 22:35:25 +0000 (Fri, 08 May 2009) Log Message: ----------- Fix typo Modified Paths: -------------- trunk/gplots/man/plotCI.Rd Modified: trunk/gplots/man/plotCI.Rd =================================================================== --- trunk/gplots/man/plotCI.Rd 2009-05-08 22:32:28 UTC (rev 1321) +++ trunk/gplots/man/plotCI.Rd 2009-05-08 22:35:25 UTC (rev 1322) @@ -147,7 +147,7 @@ # better yet, just use plotmeans ... # plotmeans( state.area ~ state.region ) -/dontshow{ +\dontshow{ ## Just for testing plotCI(x=means, uiw=NA) plotCI(x=means, uiw=NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2009-05-08 22:32:36
|
Revision: 1321 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1321&view=rev Author: warnes Date: 2009-05-08 22:32:28 +0000 (Fri, 08 May 2009) Log Message: ----------- Update NEWS for release 2.7.0 Modified Paths: -------------- trunk/gplots/inst/NEWS Modified: trunk/gplots/inst/NEWS =================================================================== --- trunk/gplots/inst/NEWS 2009-05-08 22:30:55 UTC (rev 1320) +++ trunk/gplots/inst/NEWS 2009-05-08 22:32:28 UTC (rev 1321) @@ -1,8 +1,31 @@ -Release 2.7.0 - 2008-08-05 +Release 2.7.0 - 2009-05-08 -------------------------- New Features: + +- Enhancements to heatmap.2() + + - New arguments 'lmat', 'lhei', and 'lwid' that allow controlling + component plot layout. Users can now resize and rearrange plot + components. + + - heatmap.2() will now compute color breakpoints that are + symmetric about 0 when the new 'symbreak' parameter is TRUE. This + parameter, as well as the symkey parameter now default to TRUE + whenever negative values of x are present, and to FALSE othewise. + + - the heatmap.2() return value now includes additional useful + information, including: call, rowMeans, rowSDs, colMeans, + colSDs, carpet (reordered and scaled 'x' values), rowDendrogram, + colDendrogram, breaks, col, vline, hline, and colorTable. Of + these, the most useful are breaks, col, and colorTable. The + latter is a three-column data frame providing the lower and + upper bound and color for each bin. + + See the manual page for complete details and examples. + + - New function venn(), contributed by Steffen Moeller (Thanks Steffen!) to generate Venn diagrams for up to 5 sets. See ?venn for details. @@ -15,10 +38,6 @@ using the new bandplot() and by using fitted() instead of predict() to obtain y-hat. -- New arguments for heatmap.2 ('lmat', 'lhei', and 'lwid') that allow - controlling component plot layout. This allows the user to both - resize and rearrange plot components. - - Add 'scale.range' argument to balloonplot(), option to scale balloons so [min,max]->[0,1] ('relative') or [0,max] -> [0,1] ('absolute'). @@ -29,9 +48,14 @@ - balloonplot() now properly handles dimension labels provided by 'xlab' and 'ylab' +- plotCI now properly handles 'NULL' and 'NA' values for ui, li, uiw, + and liw. + - Corrections of minor typos in man pages +- Update Greg's email address to 'gr...@ra...' + Release 2.6.0 - 2008-04-07 -------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2009-05-08 22:31:03
|
Revision: 1320 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1320&view=rev Author: warnes Date: 2009-05-08 22:30:55 +0000 (Fri, 08 May 2009) Log Message: ----------- We don't want the Changelog in svn, since it is autogenerated from svn logs! Removed Paths: ------------- trunk/gplots/inst/ChangeLog Deleted: trunk/gplots/inst/ChangeLog =================================================================== --- trunk/gplots/inst/ChangeLog 2009-05-08 22:01:12 UTC (rev 1319) +++ trunk/gplots/inst/ChangeLog 2009-05-08 22:30:55 UTC (rev 1320) @@ -1,1759 +0,0 @@ -2008-06-16 14:18 warnes - - * TODO, inst/TODO: Add TODO list to gplots - -2008-05-20 01:13 warnes - - * DESCRIPTION, man/plot.lm2.Rd: Update man page to match recent - changes to plot.lm2() - -2008-05-20 01:08 warnes - - * man/venn.Rd: More work on documentation for venn() - -2008-05-20 01:07 warnes - - * R/bandplot.R, man/bandplot.Rd: Fix code/doc mismatch due to - recent changes to bandplot() - -2008-05-20 00:14 warnes - - * DESCRIPTION, NAMESPACE, R/venn.R, man/venn.Rd: Add Venn Diagram - plot submitted by Steffen Moeller - -2008-05-07 18:59 warnes - - * DESCRIPTION, R/bandplot.R: Improve performance of bandplot by - calculating running standard deviation using caTools::runsd() - instead of (ver slow) window() call. In addtion, the standard - deviations are now only calculated once, rather than once for - each band. - -2008-05-07 18:57 warnes - - * R/plot.lm.R: Improve performance of plot.lm for large lm objects - by using fitted() instead of predict() to get y-hat - -2008-05-05 20:28 warnes - - * DESCRIPTION, R/bandplot.R: Use caTools's runsd in bandplot for a - dramatic speedup for large data - -2008-05-05 20:28 warnes - - * NAMESPACE: Add import of gtools::reorder.factor for ballonplot - man page - -2008-05-05 20:27 warnes - - * R/balloonplot.R, man/balloonplot.Rd: balloonplot: Add option to - scale balloons so [min,max]->[0,1] (relative) or so [0,max] <- - [0,1] (absolute) - -2008-04-07 17:09 warnes - - * man/barplot2.Rd: Fix typo in barplot2() man page - -2008-04-07 16:52 warnes - - * DESCRIPTION, inst/ChangeLog, inst/NEWS: Updates for gplots 2.6.0 - -2008-04-07 16:47 warnes - - * R/heatmap.2.R, man/heatmap.2.Rd: Add ability to control location - of individual heatmap.2 components - -2008-03-27 22:36 warnes - - * R/heatmap.2.R: Fix bug in handling rowsep, per suggestion by - Steven Paugh - -2008-01-04 18:59 warnes - - * man/overplot.Rd: Fix examples for overplot() - -2008-01-02 16:58 warnes - - * man/barplot2.Rd: Update Marc's email address - -2007-12-20 22:48 warnes - - * man/heatmap.2.Rd: Two letter clarification of help text for - heatmap.2() - -2007-12-20 22:24 warnes - - * man/ooplot.Rd: Restore plot layout at end of ooplot() example - -2007-11-06 16:24 warnes - - * man/hist2d.Rd: Remove extraneous closing brace in the hist2d - documentation file - -2007-11-05 15:32 warnes - - * inst/NEWS: Fix typo in NEWS: col2hex() is the new function, not - col2rgb() which is part of grDevices - -2007-11-02 19:32 warnes - - * DESCRIPTION, NAMESPACE, inst/ChangeLog, inst/NEWS: Updates for - gplots 2.5.0 - -2007-11-02 19:32 warnes - - * tests/heatmap2Test.Rout.save: Update saved test output due to - changes in how R reports warnings - -2007-11-02 18:22 warnes - - * ChangeLog, NEWS: Create soft links of gmodels/ChangeLog -> - gmodels/inst/ChangeLog, and gmodels/NEWS -> gmodels/inst/NEWS for - my convenience - -2007-11-02 18:21 warnes - - * ChangeLog, NEWS, inst/ChangeLog, inst/NEWS: Move actual ChangeLog - and NEWS files to gmodels/inst so they will be copied into the - installed R package area - -2007-11-02 18:18 warnes - - * man/bandplot.Rd, man/textplot.Rd: Fix code/doc mismatches - -2007-11-02 18:18 warnes - - * R/plot.lm.R: Update plot.lm2 to match changes made to bandplot - -2007-11-01 20:20 warnes - - * ChangeLog, DESCRIPTION, R/replaceTabs.R, R/textplot.R: in - textplot(), convert tab characters to spaces before processing to - avoid problems with computing height and width of text including - tabs when using pdf() - -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 - example. Thanks to Jean Vidal for reporting the error.. - -2006-08-02 22:21 warnes - - * trunk/BalloonPlotPaper/BalloonPlot.pdf, - trunk/BalloonPlotPaper/BalloonPlot.tex, - trunk/MSOfficeUtil/DESCRIPTION, - trunk/PathwayModeling/thesispaper/slides.tex, - trunk/RMCMC/DESCRIPTION, trunk/RMCMC/man/make.density.Rd, - trunk/Rlsf/DESCRIPTION, trunk/Rlsf/man/lsf.numcpu.Rd, - trunk/Rlsf/man/lsf.parRapply.Rd, trunk/Rlsf/man/scat.Rd, - trunk/bwRF/DESCRIPTION, trunk/bwRF/man/RF.Rd, - trunk/exp.ssize/inst/doc/ssize.pdf, - trunk/exp.ssize/inst/doc/ssize.tex, trunk/fork/DESCRIPTION, - trunk/fork/man/exit.Rd, trunk/fork/man/fork.Rd, - trunk/fork/man/getpid.Rd, trunk/fork/man/kill.Rd, - trunk/fork/man/signame.Rd, trunk/fork/man/wait.Rd, - trunk/gdata/inst/doc/gregmisc.tex, - trunk/gdata/man/ConvertMedUnits.Rd, - trunk/gdata/man/aggregate.table.Rd, trunk/gdata/man/combine.Rd, - trunk/gdata/man/interleave.Rd, trunk/gdata/man/matchcols.Rd, - trunk/gdata/man/nobs.Rd, trunk/gdata/man/read.xls.Rd, - trunk/gdata/man/rename.vars.Rd, trunk/gdata/man/reorder.Rd, - trunk/gdata/man/trim.Rd, trunk/gdata/man/unmatrix.Rd, - trunk/gdata/man/upperTriangle.Rd, - trunk/gmodels/man/fast.prcomp.Rd, - trunk/gmodels/man/fit.contrast.Rd, trunk/gmodels/man/glh.test.Rd, - trunk/gmodels/man/make.contrasts.Rd, inst/doc/BalloonPlot.pdf, - man/balloonplot.Rd, man/bandplot.Rd, man/boxplot.n.Rd, - man/colorpanel.Rd, man/hist2d.Rd, man/ooplot.Rd, man/overplot.Rd, - man/plot.lm2.Rd, man/plotCI.Rd, man/plotmeans.Rd, - man/residplot.Rd, man/sinkplot.Rd, man/smartlegend.Rd, - man/space.Rd, man/textplot.Rd, man/wapply.Rd, - trunk/gregmisc/DESCRIPTION, - trunk/gregmisc/gregmisc/DESCRIPTION.standalone, - trunk/gregmisc/inst/doc/gregmisc.tex, - trunk/gtools/man/addLast.Rd, trunk/gtools/man/assert.Rd, - trunk/gtools/man/capture.Rd, trunk/gtools/man/combinations.Rd, - trunk/gtools/man/defmacro.Rd, trunk/gtools/man/dirichlet.Rd, - trunk/gtools/man/foldchange.Rd, trunk/gtools/man/invalid.Rd, - trunk/gtools/man/logit.Rd, trunk/gtools/man/mixedsort.Rd, - trunk/gtools/man/oddeven.Rd, trunk/gtools/man/permute.Rd, - trunk/gtools/man/quantcut.Rd, trunk/gtools/man/running.Rd, - trunk/gtools/man/scat.Rd, trunk/gtools/man/setTCPNoDelay.Rd, - trunk/nws/DESCRIPTION, trunk/qvalue/DESCRIPTION, - trunk/qvalue/man/print.qvalue.Rd, trunk/ssize/DESCRIPTION, - trunk/ssize/man/pow.Rd: Update my email address - -2006-06-26 21:08 nj7w - - * R/heatmap.2.R: Fixed a bug which displayed warnings when Rowv and - Colv were specified as dendrograms - -2006-03-10 17:24 warnes - - * tests/heatmap2Test.R: Remove code that added a local path - -2006-03-09 22:53 nj7w - - * tests/heatmap2Test.R, tests/heatmap2Test.Rout.save: Added the - correct library path where gplots is installed locally and - corresponding .save file - -2006-03-09 22:40 nj7w - - * tests/heatmap2Test.R: Updated the tests file - -2006-03-09 22:39 nj7w - - * R/heatmap.2.R: Removed the condition Colv != Rowv as it has - already been taken care of - -2006-03-09 22:17 nj7w - - * rtPCR.rda: Deleted rtPCR.rda from the main directory - -2006-03-09 22:09 nj7w - - * ChangeLog: Added ChangeLog - -2006-03-07 18:18 nj7w - - * DESCRIPTION, NEWS: Updated ChangeLog and NEWS - -2006-03-07 18:10 nj7w - - * tests, tests/heatmap2Test.R, tests/heatmap2Test.Rout.save: Added - the tests and fixed corrupted files - -2006-03-07 16:22 nj7w - - * data/rtPCR.rda: Replaced the corrupted rtPCR.rda file in data - directory - -2006-03-07 16:14 nj7w - - * tests: Removed the corrputed tests directory - -2006-03-07 16:12 nj7w - - * data/rtPCR.rda, rtPCR.rda: Replaced the corrupted rtPCR.rda file - in data directory - -2006-03-03 21:03 nj7w - - * R/heatmap.2.R, man/heatmap.2.Rd: Updated the code and man page to - make sure the Rowv and Colv values are properly handled - -2006-03-02 21:43 warnes - - * R/balloonplot.R: Adjust row total placement to adjust for width - of the totals - -2006-03-02 21:26 warnes - - * DESCRIPTION, R/balloonplot.R, man/1: Row totals in ballonplot - were in reverse order. Fixed. - -2006-02-23 22:00 nj7w - - * R/heatmap.2.R, tests/heatmap2Test.R: Add ability to scale the - color key using the new 'keysize' argument. - -2006-02-23 21:34 nj7w - - * tests, tests/heatmap2Test.R, tests/heatmap2Test.Rout.save: Add - tests for heatmap.2 - -2006-02-23 21:25 nj7w - - * inst/doc/Figure1.eps, inst/doc/Table.eps, inst/doc/bka.bst, - inst/doc/heatmap2.R, inst/doc/heatmap2.tex, - inst/doc/regression_rank_image.Rda, - inst/doc/regression_rank_image_II.Rda: Move heatmap and - ballonplot paper source materials to their respective cvs modules - -2006-02-23 21:20 nj7w - - * inst/doc/BalloonPlot.R, inst/doc/BalloonPlot.tex, - inst/doc/Figure1.pdf, inst/doc/Figure2.pdf, inst/doc/Figure3.pdf, - inst/doc/Figure4.pdf, inst/doc/Rnews.sty, - inst/doc/SurvivedPop.pdf, inst/doc/SurvivedPopWhite.pdf, - inst/doc/SurvivedProp.pdf, inst/doc/TotalPop.pdf: Moved - balloonplot paper materials to BallonPlotPaper cvs module - -2006-02-23 21:18 nj7w - - * inst/doc/colSeparator.pdf, inst/doc/logData.pdf, - inst/doc/logDataColDendrogram.pdf, inst/doc/logDataColOrd.pdf, - inst/doc/logDataColOrdNo.pdf, inst/doc/logDataRowDendrogram.pdf, - inst/doc/origScale.pdf, inst/doc/rowSeparator.pdf, - inst/doc/scaled.pdf: Remove heatmap paper files and move them to - the HeatmapPaper cvs module. - -2006-02-23 19:57 nj7w - - * inst/doc/colSeparator.pdf, inst/doc/logData.pdf, - inst/doc/logDataColDendrogram.pdf, inst/doc/logDataColOrd.pdf, - inst/doc/logDataColOrdNo.pdf, inst/doc/logDataRowDendrogram.pdf, - inst/doc/origScale.pdf, inst/doc/rowSeparator.pdf, - inst/doc/scaled.pdf: Added figures for heatmap2 paper - -2006-02-23 19:54 nj7w - - * inst/doc/regression_rank_image.Rda, - inst/doc/regression_rank_image_II.Rda: Added the .Rda files for - the heatmap2 paper - -2006-02-23 19:52 nj7w - - * inst/doc/heatmap2.tex: Added the source - (tex file) of the - heatmap paper - -2006-02-23 19:51 nj7w - - * inst/doc/heatmap2.R: Added the code for the figures of heatmap - paper - -2006-02-21 22:19 nj7w - - * R/heatmap.2.R, man/heatmap.2.Rd: Minor updates to heatmap.2 - - fixed Rowv, Colv and dendrogram behaviour. Now Rowv=NULL or FALSE - both imply no dendrogram computation. - -2006-01-12 23:10 warnes - - * inst/doc/BalloonPlot.R, inst/doc/BalloonPlot.pdf, - inst/doc/BalloonPlot.tex, inst/doc/Figure1.pdf, - inst/doc/Figure2.pdf, inst/doc/Figure3.pdf, inst/doc/Figure4.pdf: - more updates - -2006-01-12 23:01 warnes - - * inst/doc/bka.bst: Add Biometrica bibliography style file - -2006-01-12 22:34 warnes - - * inst/doc/BalloonPlot.tex: A little more. - -2006-01-12 22:32 warnes - - * inst/doc/BalloonPlot.tex: Updates to respond to referee. - -2006-01-12 19:59 nj7w - - * inst/doc/BalloonPlot.tex: Added references - -2005-12-13 17:01 nj7w - - * inst/doc/BalloonPlot.tex: Fixed Nitin's company name - -2005-12-13 16:18 nj7w - - * ChangeLog, NEWS, trunk/gtools/NEWS: Updated NEWS and removed - ChangeLog - -2005-12-12 22:20 nj7w - - * R/plotmeans.R: Fixed bug in plotmeans - based on Stefano Calza's - suggestion - -2005-12-07 18:52 nj7w - - * DESCRIPTION: Updated version number - -2005-12-07 18:50 nj7w - - * NAMESPACE, R/plot.lm.R, man/plot.lm2.Rd: Added plot.lm - -2005-12-07 18:48 nj7w - - * man/barplot2.Rd: Changed the default grey colors to heat colors, - if height is matrix - -2005-12-07 18:48 nj7w - - * R/barplot2.R: Changed the default greay colors to heat colors, if - height is matrix - -2005-12-06 22:41 nj7w - - * man/barplot2.Rd: Fixed minor error in documentation of barplot2 - -2005-12-02 21:11 warnes - - * R/plot.lm.R: Remove .Alias calls, since .Alias is defunct. - -2005-12-01 16:54 nj7w - - * trunk/gmodels/man/ci.Rd, trunk/gmodels/man/coefFrame.Rd, - trunk/gmodels/man/estimable.Rd, - trunk/gmodels/man/fit.contrast.Rd, - trunk/gmodels/man/make.contrasts.Rd, man/balloonplot.Rd, - man/bandplot.Rd, man/boxplot.n.Rd, man/colorpanel.Rd, - man/overplot.Rd, man/plotmeans.Rd, man/textplot.Rd, - man/wapply.Rd, trunk/gtools/man/combinations.Rd, - trunk/gtools/man/foldchange.Rd, trunk/gtools/man/invalid.Rd, - trunk/gtools/man/logit.Rd, trunk/gtools/man/mixedsort.Rd, - trunk/gtools/man/oddeven.Rd, trunk/gtools/man/quantcut.Rd, - trunk/gtools/man/running.Rd: Updated Greg's email address - -2005-11-23 22:05 nj7w - - * inst/doc/BalloonPlot.R, inst/doc/BalloonPlot.pdf, - inst/doc/BalloonPlot.tex, inst/doc/Figure2.pdf: Updated Figure 2 - colors - -2005-11-18 20:40 warnes - - * inst/doc/BalloonPlot.pdf, inst/doc/Figure1.pdf, - inst/doc/Figure2.pdf, inst/doc/Figure3.pdf, inst/doc/Figure4.pdf: - Latest version of the pdf files - -2005-11-18 20:37 warnes - - * inst/doc/BalloonPlot.tex: Nitin works for the Cambrige Group, not - Pfizer. - -2005-11-18 20:34 warnes - - * inst/doc/BalloonPlot.tex: Minor text rewording. - -2005-11-18 20:31 warnes - - * inst/doc/BalloonPlot.R, inst/doc/BalloonPlot.tex: More edits. - -2005-11-18 19:50 warnes - - * R/balloonplot.R: Recent changes to align row totals with the - overall total broke how - the marginal cumulative fractions were displayed. This patch - fixes - the problem. - -2005-11-18 01:17 warnes - - * DESCRIPTION, R/balloonplot.R, R/plot.lm.R, - inst/doc/BalloonPlot.pdf, man/balloonplot.Rd: - Update - documentation for balloonplot to match the latest code. - - Correct spelling of 'show.zeroes' to 'show.zeros' - -2005-11-18 00:16 warnes - - * R/colorpanel.R: More changes: colorpanel now allows only 2 colors - to be specified if - no 'middle' color is desired. - -2005-11-17 22:08 warnes - - * R/balloonplot.R: Allow user to control removal of duplicate - entries in balloonplot. - -2005-11-17 22:06 warnes - - * R/colorpanel.R, man/colorpanel.Rd: Extend colorpanel to handle - just two-colors in addition to three. - -2005-11-09 22:39 nj7w - - * inst/doc/BalloonPlot.pdf: Updated the pdf file - -2005-11-09 22:38 nj7w - - * inst/doc/BalloonPlot.R, inst/doc/BalloonPlot.tex: Updated the - changes - -2005-11-09 22:29 nj7w - - * inst/doc/Figure4.pdf: Modified figure 4 - -2005-11-09 22:29 nj7w - - * inst/doc/BalloonPlot.R: Updated code - -2005-11-09 22:20 nj7w - - * inst/doc/Figure3.pdf: Modified figure 3 - -2005-11-09 22:20 nj7w - - * inst/doc/Figure2.pdf: Modified figure 2 - -2005-11-09 22:19 nj7w - - * inst/doc/Figure1.pdf: Modified figure 1 - -2005-11-08 16:19 nj7w - - * man/plotCI.Rd: Updated Greg's email - -2005-11-07 16:58 nj7w - - * inst/doc/BalloonPlot.pdf, inst/doc/BalloonPlot.tex: Minor - modifications to fit the code properly on pdf - -2005-11-07 14:22 warnes - - * inst/doc/BalloonPlot.R: Add R code that generates plots - -2005-11-07 14:18 warnes - - * inst/doc/Figure2.pdf, inst/doc/Figure3.pdf, inst/doc/Figure4.pdf: - Add figures to CVS - -2005-11-07 14:18 warnes - - * inst/doc/BalloonPlot.pdf, inst/doc/BalloonPlot.tex, - inst/doc/Figure1.pdf: Text changes - -2005-11-04 21:48 warnes - - * R/balloonplot.R: Fix some alignment issues. - -2005-11-04 19:05 warnes - - * inst/doc/BalloonPlot.pdf, inst/doc/Table.pdf: Remove Table.pdf - since it is no longer needed - -2005-11-04 19:04 warnes - - * inst/doc/BalloonPlot.pdf, inst/doc/BalloonPlot.tex, - inst/doc/Figure1.pdf: Nitin's Changes - -2005-11-04 19:00 warnes - - * inst/doc/SurvivedPop.pdf, inst/doc/SurvivedPopWhite.pdf, - inst/doc/SurvivedProp.pdf, inst/doc/TotalPop.pdf: Add figure - plots - -2005-11-04 18:59 warnes - - * inst/doc/BalloonPlot.pdf, inst/doc/BalloonPlot.tex: Fix paths - -2005-10-20 18:36 nj7w - - * inst/doc/Figure1.eps, inst/doc/Table.eps: added the eps version - of figures - -2005-10-20 18:35 nj7w - - * inst/doc/BalloonPlot.pdf: Updated BallonPlot.pdf - -2005-10-20 18:34 nj7w - - * inst/doc/SurvivedPop.pdf, inst/doc/SurvivedPopWhite.pdf, - inst/doc/SurvivedProp.pdf, inst/doc/TotalPop.pdf: Removed Old - Figure - -2005-10-20 18:31 nj7w - - * inst/doc/Figure1.pdf, inst/doc/Table.pdf: Added the new figure - - for total popluation - Balloonplot - -2005-10-20 18:29 nj7w - - * inst/doc/BalloonPlot.tex: Modified the BallonPlot article - -2005-10-20 14:12 nj7w - - * inst/doc/BalloonPlot.tex: Added references - -2005-10-19 16:57 arnima - - * man/rich.color.Rd: The last example now displays the correct - heat.colors. - Default 'palette' argument is now a single string, not a vector. - -2005-10-19 16:56 arnima - - * R/rich.color.R: Default 'palette' argument is now a single - string, not a vector. - -2005-10-14 19:13 warnes - - * DESCRIPTION, R/balloonplot.R, man/balloonplot.Rd: Formatting - fixes: - - Handle multiple row or column category variables - - Separate rows/columns of category labels by lines - - Fix handling of 'cumsum' plots on row/column labels - - Improve display of row/column sums - -2005-10-13 20:00 warnes - - * man/balloonplot.Rd: Add example using Titanic data that exercises - the multi-factor - display. - -2005-10-11 21:20 warnes - - * R/balloonplot.R: Initial changes to allow multiple x and y factor - variables. Yet to - be done: 1) remove extra 'boxes'. 2) omit duplicated values - -2005-10-04 19:39 warnes - - * inst/doc/BalloonPlot.pdf, inst/doc/BalloonPlot.tex: more minor - fixes - -2005-10-04 19:29 warnes - - * inst/doc/BalloonPlot.pdf, inst/doc/BalloonPlot.tex: fix spacing - -2005-10-04 19:08 warnes - - * inst/doc/Rnews.sty: Inlcude Rnews.sty - -2005-10-04 19:07 warnes - - * inst/doc/BalloonPlot.pdf, inst/doc/BalloonPlot.tex: Some textual - edits. - -2005-10-03 16:23 nj7w - - * inst/doc/SurvivedPop.pdf, inst/doc/SurvivedPopWhite.pdf, - inst/doc/SurvivedProp.pdf, inst/doc/TotalPop.pdf: Added figures - for the R-News Article - -2005-09-29 21:02 nj7w - - * inst/doc/BalloonPlot.pdf, inst/doc/BalloonPlot.tex: Updated the - documentation - added the name of the person who asked the - question - -2005-09-29 20:29 nj7w - - * inst, inst/doc, inst/doc/BalloonPlot.pdf, - inst/doc/BalloonPlot.tex: Added R-news article - -2005-09-12 15:44 nj7w - - * trunk/gdata/man/aggregate.table.Rd, - trunk/gdata/man/interleave.Rd, trunk/gdata/man/matchcols.Rd, - trunk/gdata/man/nobs.Rd, trunk/gdata/man/read.xls.Rd, - trunk/gdata/man/rename.vars.Rd, trunk/gdata/man/trim.Rd, - trunk/gdata/man/unmatrix.Rd, trunk/gmodels/man/fast.prcomp.Rd, - trunk/gmodels/man/glh.test.Rd, man/hist2d.Rd, man/ooplot.Rd, - man/residplot.Rd, man/sinkplot.Rd, man/smartlegend.Rd, - man/space.Rd, trunk/gtools/man/assert.Rd, - trunk/gtools/man/dirichlet.Rd, trunk/gtools/man/permute.Rd, - trunk/gtools/man/scat.Rd: Updated Greg's email - -2005-09-12 14:45 nj7w - - * R/balloonplot.R: Updated version of balloonplot - by Romain - Francois <fra...@fr...> - -2005-09-09 20:34 nj7w - - * ChangeLog, DESCRIPTION: Updated the version and ChangeLog - -2005-09-09 20:32 nj7w - - * R/balloonplot.R, man/balloonplot.Rd: Changes in ballon plot based - on Romain Francois (fra...@fr...) suggestions - -2005-09-06 21:41 nj7w - - * DESCRIPTION: Updated package dependencies - -2005-09-06 21:41 nj7w - - * NEWS: Added NEWS - -2005-09-02 23:10 nj7w - - * trunk/gmodels/ChangeLog, ChangeLog: Added ChangeLog - -2005-08-31 16:28 nj7w - - * trunk/gdata/DESCRIPTION, trunk/gmodels/DESCRIPTION, DESCRIPTION: - Added DESCRIPTION file - -2005-08-31 16:27 nj7w - - * trunk/gdata/DESCRIPTION.in, trunk/gmodels/DESCRIPTION.in, - DESCRIPTION.in: removed DESCRIPTION.in - -2005-06-09 14:20 nj7w - - * trunk/gdata/R/Args.R, trunk/gdata/R/aggregate.table.R, - trunk/gdata/R/combine.R, trunk/gdata/R/elem.R, - trunk/gdata/R/env.R, trunk/gdata/R/frameApply.R, - trunk/gdata/R/interleave.R, trunk/gdata/R/is.what.R, - trunk/gdata/R/keep.R, trunk/gdata/R/ll.R, - trunk/gdata/R/matchcols.R, trunk/gdata/R/nobs.R, - trunk/gdata/R/read.xls.R, trunk/gdata/R/rename.vars.R, - trunk/gdata/R/reorder.R, trunk/gdata/R/trim.R, - trunk/gdata/R/unmatrix.R, trunk/gdata/inst/perl/IO/AtomicFile.pm, - trunk/gdata/inst/perl/IO/InnerFile.pm, - trunk/gdata/inst/perl/IO/Lines.pm, - trunk/gdata/inst/perl/IO/Scalar.pm, - trunk/gdata/inst/perl/IO/Scalar.pm.html, - trunk/gdata/inst/perl/IO/ScalarArray.pm, - trunk/gdata/inst/perl/IO/Stringy.pm, - trunk/gdata/inst/perl/IO/Wrap.pm, - trunk/gdata/inst/perl/IO/WrapTie.pm, - trunk/gdata/man/aggregate.table.Rd, trunk/gdata/man/combine.Rd, - trunk/gdata/man/drop.levels.Rd, trunk/gdata/man/interleave.Rd, - trunk/gdata/man/nobs.Rd, trunk/gdata/man/rename.vars.Rd, - trunk/gdata/man/reorder.Rd, trunk/gmodels/R/ci.R, - trunk/gmodels/R/coefFrame.R, trunk/gmodels/R/estimable.R, - trunk/gmodels/R/fast.prcomp.R, trunk/gmodels/R/fit.contrast.R, - trunk/gmodels/R/glh.test.R, trunk/gmodels/R/make.contrasts.R, - trunk/gmodels/man/CrossTable.Rd, trunk/gmodels/man/ci.Rd, - trunk/gmodels/man/coefFrame.Rd, trunk/gmodels/man/estimable.Rd, - trunk/gmodels/man/fast.prcomp.Rd, - trunk/gmodels/man/fit.contrast.Rd, trunk/gmodels/man/glh.test.Rd, - trunk/gmodels/man/make.contrasts.Rd, R/balloonplot.R, - R/bandplot.R, R/boxplot.n.R, R/colorpanel.R, R/heatmap.2.R, - R/hist2d.R, R/lowess.R, R/ooplot.R, R/overplot.R, R/plotCI.R, - R/plotmeans.R, R/qqnorm.aov.R, R/residplot.R, R/rich.color.R, - R/sinkplot.R, R/smartlegend.R, R/space.R, R/textplot.R, - R/wapply.R, man/1, man/bandplot.Rd, man/barplot2.Rd, - man/boxplot.n.Rd, man/hist2d.Rd, man/lowess.Rd, man/plotCI.Rd, - man/plotmeans.Rd, man/residplot.Rd, man/space.Rd, man/wapply.Rd, - trunk/gtools/R/RSCompat.S, trunk/gtools/R/combinations.R, - trunk/gtools/R/dirichlet.R, trunk/gtools/R/foldchange.R, - trunk/gtools/R/invalid.R, trunk/gtools/R/logit.R, - trunk/gtools/R/mixedsort.R, trunk/gtools/R/oddeven.R, - trunk/gtools/R/permute.R, trunk/gtools/R/quantcut.R, - trunk/gtools/R/running.R, trunk/gtools/R/scat.R, - trunk/gtools/man/ELISA.Rd, trunk/gtools/man/combinations.Rd, - trunk/gtools/man/dirichlet.Rd, trunk/gtools/man/foldchange.Rd, - trunk/gtools/man/invalid.Rd, trunk/gtools/man/logit.Rd, - trunk/gtools/man/mixedsort.Rd, trunk/gtools/man/oddeven.Rd, - trunk/gtools/man/permute.Rd, trunk/gtools/man/quantcut.Rd, - trunk/gtools/man/running.Rd, trunk/gtools/man/scat.Rd: Updating - the version number, and various help files to synchronize - splitting of gregmisc bundle in 4 individual components. - -2005-06-09 14:15 nj7w - - * R/barplot2.R: Changes based on Marc Schwartz's suggestions to - handel 0's and NA's appropriately. - -2005-05-13 18:59 nj7w - - * trunk/gdata/R/read.xls.R, trunk/gmodels/man/CrossTable.Rd, - man/heatmap.2.Rd: 1) Using dQuote.ascii function in read.xls as - the new version of dQuote doesn't work proprly with UTF-8 locale. - 2) Modified CrossTable.Rd usage in gmodels - 3) Modified heatmap.2 usage in gplots. - -2005-04-04 14:23 warnes - - * R/overplot.R: Explicitly reference package containing - lowess.formula in - panel.overplot(). This should fix the error reported by Troels - Ring - <tr...@gv...>. - -2005-02-26 01:15 nj7w - - * trunk/gdata/NAMESPACE, trunk/gdata/man/elem.Rd, - trunk/gdata/man/env.Rd, trunk/gdata/man/ll.Rd, - trunk/gdata/man/read.xls.Rd, R/heatmap.2.R, man/heatmap.2.Rd, - man/rich.color.Rd, man/sinkplot.Rd, man/textplot.Rd: *** empty - log message *** - -2005-02-25 23:22 warnes - - * trunk/gdata/R/elem.R, trunk/gdata/R/env.R, trunk/gdata/R/ll.R, - trunk/gdata/man/Args.Rd, trunk/gdata/man/env.Rd, - trunk/gdata/man/ll.Rd, man/rich.color.Rd: Integrate changes - submitted by Arni Magnusson - -2005-02-25 22:31 warnes - - * NAMESPACE: Add dependency imports from 'stats' package. - -2005-02-22 21:01 warnes - - * R/bandplot.R: Fix problem in passing graphical parameters - (xlim,etc).@ - -2005-02-08 16:41 warnes - - * DESCRIPTION.in: Improve package title. - -2005-02-08 16:40 warnes - - * R/heatmap.2.R: Ignore missing values when computing symmetric - range. - -2005-02-02 19:25 warnes - - * man/plotmeans.Rd: Add more extensive example. - -2005-01-14 19:05 warnes - - * R/textplot.R: Code can be simplified because R now supports - selecting a fixed width font. - -2005-01-12 20:50 warnes - - * trunk/gdata/DESCRIPTION.in, trunk/gmodels/DESCRIPTION.in, - DESCRIPTION.in, trunk/gtools/DESCRIPTION.in: Add dependency on R - 1.9.0+ to prevent poeple from installing on old - versions of R which don't support namespaces. - -2004-11-30 01:06 warnes - - * R/heatmap.2.R, man/heatmap.2.Rd: 1. Add new parameters for - controlling color key: - - If `symkey==TRUE', the color key will be made symmetric about - 0. - - The `densadj' parameter can be used to modify the smoother - width - (see the `adjust' parameter under `help(density)') for the - density - plotted in the key. - - 2. Fix handling of rowsep/colsep. - - 3. Vector of length 2 giving the width (colsep) or height - (rowsep) the separator box - drawn by colsep and rowsep as a function of the width (colsep) or - height (rowsep) of a cell. - - 4. Appropriate changes to the corresponding help page, plus some - minor formatting changes. - -2004-11-03 19:43 warnes - - * R/heatmap.2.R: Fix bugs in layout of cell notes. They were being - plotted top down - rather than bottom up. Further reordering of the x matrix didn't - also reorder the notes. Both issues should now be resolved. - -2004-09-27 21:01 warneg - - * trunk/gdata/DESCRIPTION, trunk/gdata/DESCRIPTION.in, - trunk/gdata/NAMESPACE, trunk/gdata/man/.Rhistory, - trunk/gmodels/DESCRIPTION, trunk/gmodels/DESCRIPTION.in, - DESCRIPTION, DESCRIPTION.in, man/sinkplot.Rd, man/textplot.Rd, - trunk/gregmisc/.Rhistory, trunk/gregmisc/DESCRIPTION, - trunk/gtools/DESCRIPTION, trunk/gtools/DESCRIPTION.in, - trunk/gtools/man/running.Rd: Updated to pass R CMD check. - -2004-09-03 22:50 warneg - - * man/textplot.Rd: Provide explicit package for call to nobs. - -2004-09-03 22:50 warneg - - * man/heatmap.2.Rd: Fix typos. - -2004-09-03 17:27 warneg - - * trunk/gdata/DESCRIPTION, trunk/gdata/DESCRIPTION.in, - trunk/gdata/NAMESPACE, trunk/gdata/R/Args.R, - trunk/gdata/R/aggregate.table.R, trunk/gdata/R/combine.R, - trunk/gdata/R/elem.R, trunk/gdata/R/env.R, - trunk/gdata/R/interleave.R, trunk/gdata/R/is.what.R, - trunk/gdata/R/keep.R, trunk/gdata/R/ll.R, - trunk/gdata/R/matchcols.R, trunk/gdata/R/nobs.R, - trunk/gdata/R/read.xls.R, trunk/gdata/R/rename.vars.R, - trunk/gdata/R/reorder.R, trunk/gdata/R/trim.R, - trunk/gdata/man/reorder.Rd, trunk/gmodels/DESCRIPTION, - trunk/gmodels/NAMESPACE, trunk/gmodels/R/CrossTable.R, - trunk/gmodels/R/ci.R, trunk/gmodels/R/estimable.R, - trunk/gmodels/R/fast.prcomp.R, trunk/gmodels/R/fit.contrast.R, - trunk/gmodels/R/glh.test.R, trunk/gmodels/R/make.contrasts.R, - trunk/gmodels/man/estimable.Rd, - trunk/gmodels/man/fit.contrast.Rd, trunk/gmodels/man/glh.test.Rd, - trunk/gmodels/man/make.contrasts.Rd, DESCRIPTION, NAMESPACE, - R/balloonplot.R, R/bandplot.R, R/barplot2.R, R/boxplot.n.R, - R/colorpanel.R, R/heatmap.2.R, R/hist2d.R, R/lowess.R, - R/ooplot.R, R/overplot.R, R/plotCI.R, R/plotmeans.R, - R/qqnorm.aov.R, R/residplot.R, R/rich.color.R, R/sinkplot.R, - R/smartlegend.R, R/space.R, R/textplot.R, R/wapply.R, - trunk/gtools/DESCRIPTION, trunk/gtools/NAMESPACE, - trunk/gtools/R/dirichlet.R, trunk/gtools/R/foldchange.R, - trunk/gtools/R/invalid.R, trunk/gtools/R/mixedsort.R, - trunk/gtools/R/oddeven.R, trunk/gtools/R/permute.R, - trunk/gtools/R/quantcut.R, trunk/gtools/R/running.R, - trunk/gtools/man/running.Rd: initial bundle checkin - -2004-09-02 17:14 warneg - - * trunk/gdata/DESCRIPTION, trunk/gdata/DESCRIPTION.in, - trunk/gdata/NAMESPACE, trunk/gdata/man/.Rhistory, - trunk/gmodels/DESCRIPTION, trunk/gmodels/DESCRIPTION.in, - trunk/gmodels/NAMESPACE, DESCRIPTION, DESCRIPTION.in, NAMESPACE, - man/1, man/residplot.Rd, trunk/gregmisc/.Rhistory, - trunk/gtools/DESCRIPTION, trunk/gtools/DESCRIPTION.in, - trunk/gtools/NAMESPACE: Initial revision - -2004-07-29 14:49 warnes - - * R/plotCI.R, man/plotCI.Rd: Integrate changes from the version of - plotCI maintained by Martin Maechler. - -2004-06-30 19:32 warnes - - * R/textplot.R: Remove commented-out code. - -2004-06-30 19:26 warnes - - * R/textplot.R: Fixed text size calculations - -2004-06-28 20:16 warnes - - * R/barplot2.R, man/barplot2.Rd: - Default 2-d color set to grey as - in (v2.0.0) r-devel - - The default (v1.9.1) barplot method now handles vectors and 1-d - arrays - (e.g., obtained by table()) the same, and uses grey instead of - heat color palettes in these cases. (Also fixes PR#6776.) - - Updated to reflect the addition of 'offset' argument in base - - Fix bug in stacked barplots, which would not be plotted - properly - -2004-06-24 16:57 warnes - - * R/heatmap.2.R, man/heatmap.2.Rd: Add ability to specify color of - NA cells. - -2004-05-27 15:11 warnes - - * man/plotCI.Rd: Fix spelling error. - -2004-05-26 14:56 warnes - - * R/overplot.R: One more fix to get it right. - -2004-05-26 13:50 warnes - - * R/overplot.R: Use triple-colon operator ':::' to access - plot.formula from the graphics package. - -2004-05-26 13:19 warnes - - * man/rich.color.Rd: Replace 'F' by 'FALSE' to pass R CMD check. - -2004-05-25 18:32 warnes - - * R/overplot.R: Work around bug in R 1.9.X due to plot.formula() - not having the same - arguments as plot(). - -2004-05-25 17:33 warnes - - * R/rich.color.R, man/rich.color.Rd: Add rich.colors() submitted by - Arni Magnusson <arnima@u.washington.edu>. - -2004-05-25 02:58 warnes - - * R/ooplot.R, man/ooplot.Rd: ?? - -2004-05-24 23:43 warnes - - * R/plotCI.R, R/plotmeans.R: Modified to use invalid() to check - arguments instead of missing(). - This fixes some build errors under R-1.9.0-Patched. - -2004-04-22 15:44 warnes - - * R/ooplot.R, man/ooplot.Rd: Integrate changes from Lodewijk - Bonebakker <bon...@co...> - -2004-04-13 13:42 warnes - - * R/space.R, man/space.Rd: Add ability to space points along 'y' - direction. - -2004-04-02 19:06 warnes - - * R/smartlegend.R: Fixed smartlegend() positioning when x and/or y - axis are log-scale. - -2004-03-30 19:04 warnes - - * R/textplot.R, trunk/gregmisc/DESCRIPTION: - Fix bug in textplot() - reported by Wright, Kevin <kev...@pi...>. - -2004-03-26 22:27 warnes - - * man/textplot.Rd: Update to match changes in textplot() code. - -2004-03-26 22:25 warnes - - * man/ooplot.Rd: Remove Windows EOL characters. - -2004-03-26 22:20 warnes - - * man/barplot2.Rd: - Remove some commented-out code. - - Remove cvs log tag. - -2004-03-26 22:16 warnes - - * R/textplot.R: Misc changes. - -2004-02-17 22:22 warnes - - * man/ooplot.Rd: Minor fix to ooplot documentation. - -2004-02-17 22:21 warnes - - * R/ooplot.R, man/ooplot.Rd: Integrate ooplot updates provided by - Lodewijk Bonebakker - <bon...@co...> - -2004-02-02 16:26 warnes - - * R/colorpanel.R, man/colorpanel.Rd: - Add colorpanel function, - which generates a smoothly varying band of - colors over a three color range (lo, mid, high). - -2004-01-21 12:07 warnes - - * man/textplot.Rd: - Correct arguments to halign to match code. - -2004-01-21 05:17 warnes - - * R/lowess.R: Track R 1.9.0's move of 'lowess' from the base - package to the (new) - stats package. - -2004-01-21 04:44 warnes - - * man/sinkplot.Rd: - Fix sinkplot() example by replacing 'T' with - 'TRUE'. - -2004-01-21 04:42 warnes - - * man/ooplot.Rd: - Add some more details to the ooplot() - documentation. The - documentation is *not* complete. - -2004-01-21 04:31 warnes - - * R/textplot.R, trunk/gtools/R/capture.R: - Mark sprint() as - depreciated. - - Replace references to sprint with capture.output() - - Use match.arg for halign and valign arguments to - textplot.default. - - Fix textplot.character so that a vector of characters is - properly - displayed. Previouslt, character vectors were plotted on top of - each - other. - -2004-01-19 23:43 warnes - - * R/sinkplot.R, man/sinkplot.Rd: New function sinkplot(), as - requested on R-devel by Kevin Wright - <kw...@es...> in - https://www.stat.math.ethz.ch/pipermail/r-devel/2004-January/028483.html. - -2004-01-15 05:14 warnes - - * R/ooplot.R, man/ooplot.Rd: Add initial code and docs for ooplot() - function submitted by Lodewijk - Bonebakker <bon...@co...>. - -2003-12-03 02:46 warnes - - * trunk/gdata/man/elem.Rd, trunk/gdata/man/ll.Rd, man/lowess.Rd, - man/textplot.Rd, man/wapply.Rd, trunk/gtools/man/foldchange.Rd: - - match function argument defaults with 'usage' - -2003-12-03 02:42 warnes - - * R/heatmap.2.R, man/heatmap.2.Rd: - Fix buglets in heatmap - function - - Make a slight enhancement to the example code. - -2003-12-02 22:49 warnes - - * R/heatmap.2.R: Integrated some suggestions from Sean Davis - <sd...@ma...>. - -2003-12-02 18:22 warnes - - * man/heatmap.2.Rd: - Make final example use 16 colors instead of - 8. This looks nicer. - -2003-12-02 16:58 warnes - - * man/barplot2.Rd: - Remove '%' character from example code to - avoid errors. - -2003-12-02 16:54 warnes - - * R/plotCI.R: - Add '...' parameter to call to text to allow user - to control size/color/etc. - -2003-12-01 16:00 warnes - - * man/barplot2.Rd: - updated to match changes to barplot() in base. - -2003-12-01 15:59 warnes - - * data, data/rtPCR.rda: - Renamed rtPCR.Rda to rtPCR.rda so that R - will properly load the file - when data(rtPCR) is executed. - -2003-12-01 15:55 warnes - - * R/barplot2.R: - Follow patches applied to barplot() in base. - -2003-11-24 21:32 warnes - - * man/heatmap.2.Rd: Fix unbalanced braces. - -2003-11-24 15:09 warnes - - * R/overplot.R, man/overplot.Rd: Fix errors reported by R CMD - check. - -2003-11-21 23:13 warnes - - * man/overplot.Rd: Added missing closing brace. - -2003-11-21 23:08 warnes - - * man/rtPCR.Rd: Initial addition of these files. Used in examples - of overplot(). - -2003-11-21 22:59 warnes - - * R/heatmap.2.R, man/heatmap.2.Rd: Applied my enhancements to the - heatmap() code from R 1.8.0, and added - documentation of these changes. - -2003-11-21 22:58 warnes - - * R/overplot.R, man/overplot.Rd: - Discovered that axis(N) does the - right thing without needing to be - given location for tick marks. This allowed simplification of the - code. - - - Minor other changes for distribution - - - Addition of overplot.Rd documentation. - -2003-11-21 19:50 warnes - - * R/heatmap.2.R, man/heatmap.2.Rd: - Integrated my extensions into - the R 1.8.0 version of heatmap. - - Add Rd documentation. - -2003-11-19 14:52 warnes - - * man/bandplot.Rd: Remove extranious NULL that confused R CMD - check. - -2003-11-18 18:59 warnes - - * man/barplot2.Rd: - Tiny fix to remove R CMD check error. - -2003-11-18 18:58 warnes - - * man/smartlegend.Rd: - Added missing closing brace. - -2003-11-18 18:45 warnes - - * trunk/gdata/R/elem.R, trunk/gdata/R/env.R, - trunk/gdata/R/is.what.R, trunk/gdata/R/keep.R, - trunk/gdata/R/ll.R, R/overplot.R: - Convert from MS-Dos to Unix - line endings. - - Reformat to 80 columns. - -2003-11-10 22:11 warnes - - * trunk/gdata/R/elem.R, trunk/gdata/R/env.R, - trunk/gdata/R/is.what.R, trunk/gdata/R/keep.R, - trunk/gdata/R/ll.R, trunk/gdata/man/elem.Rd, - trunk/gdata/man/env.Rd, trunk/gdata/man/is.what.Rd, - trunk/gdata/man/keep.Rd, trunk/gdata/man/ll.Rd, R/heatmap.2.R, - R/overplot.R, R/plotmeans.R, R/space.R, R/wapply.R, - trunk/gregmisc/DESCRIPTION, trunk/gtools/R/capture.R, - trunk/gtools/man/capture.Rd: - Add files contributed by Arni - Magnusson - <arnima@u.washington.edu>. As well as some of my own. - -2003-08-19 14:58 warnes - - * R/heatmap.2.R: - Copy of local changes. - -2003-08-19 14:57 warnes - - * R/heatmap.2.R: - Checkin before re-integrating local changes. - -2003-06-19 21:23 warnes - - * R/heatmap.2.R: - Added enhanced heatmap function. - -2003-06-09 15:10 warnes - - * man/smartlegend.Rd: - Add help text for smartlegend. - -2003-06-09 14:57 warnes - - * R/smartlegend.R: - New function smartlegend(). - -2003-04-22 17:28 warnes - - * R/plotmeans.R: - Fixeed warning messing caused when 'connect' is - a vector. - -2003-04-22 15:34 warnes - - * R/barplot2.R: Update from Marc Schwartz, modified by Gregory - Warnes: - - - Modified dim() checks for 'ci.l' and 'ci.u' against 'height' - to remove R v1.7.0 if() based error msgs for vector conditions. - -2003-04-04 13:49 warnes - - * R/balloonplot.R, man/qqnorm.aov.Rd, trunk/gtools/R/dirichlet.R: - - Change occurences of 'T' to 'TRUE' - -2003-04-04 13:44 warnes - - * man/textplot.Rd: - Updated to match changes in textplot function: - - Added textplot.character - - Renamed arguments "col.margin" and "row.margin" to "cmar", and - "rmar" so that specifying "col='red'" is possible. - - Fixed R CMD check errors - - Improve comments in example - - Add textplot.matrix example - -2003-04-04 13:41 warnes - - * R/textplot.R: - Added textplot.character to handle character - strings. - - Moved test for vector and matrix arguments to textplot.default. - - Renamed arguments "col.margin" and "row.margin" to "cmar", and - "rmar" so that specifying "col='red'" is possible. - -2003-04-02 22:29 warnes - - * R/textplot.R, man/textplot.Rd: - Added textplot function and - friends, as well as documentation. - -2003-03-08 16:30 warnes - - * man/balloonplot.Rd: - Forgot to update arglist in \usage section. - -2003-03-08 16:22 warnes - - * R/balloonplot.R, man/balloonplot.Rd: - Added parameters for - rotation of and amount of space allocated for - the row and column labels. - -2003-03-07 15:48 warnes - - * trunk/gmodels/R/fast.prcomp.R, R/hist2d.R, R/qqnorm.aov.R, - trunk/gregmisc/DESCRIPTION, trunk/gtools/R/RSCompat.S: - Minor - changes to code to allow the package to be provided as an - S-Plus chapter. - -2003-03-07 15:43 warnes - - * R/lowess.R: - Add 'NULL' as the last element of if statement that - defines - lowess.default so that when the file is sourced, S-Plus doesn't - display the function definition. - -2003-03-07 15:41 warnes - - * R/lowess.R: - Specify where the defualt lowess function should be - found. - - Use getFunction in S-Plus instead of 'get' - -2003-01-30 21:43 warnes - - * R/barplot2.R, man/barplot2.Rd: - Added argument 'add' to allow - for the addition of a barplot to an - existing graphic. Default is FALSE - -2003-01-20 18:35 warnes - - * R/balloonplot.R, man/balloonplot.Rd: - Updated balloonplot help - page. - -2003-01-20 17:13 warnes - - * R/wapply.R, man/wapply.Rd: - Updated wapply.R to allow - specification of evaluation points when - method is 'width' or 'range' using the 'pts' argument. - - Updated wapply.Rd to add 'pts' argument - - Fixed typos, spelling errors, gramatical errors and lack of - clarity - in wapply.Rd help text. - -2003-01-03 21:34 warnes - - * R/balloonplot.R, man/balloonplot.Rd: - Initial checkin of - balloonplot functions and documentation. - -2003-01-03 19:23 warnes - - * man/space.Rd: - Added reference to and comparison example of - sunflowerplot. - - Added code to put example plots on same plot window using - par(mfrow=...). - -2003-01-02 16:09 warnes - - * R/barplot2.R: - Changed assignment statements that used "=" to - "<-" to avoid syntax - errors in older versions of the S language. - -2003-01-02 16:07 warnes - - * R/lowess.R: - Added wrapper code so that R-specific fiddling - won't be executed - under S-Plus. - -2003-01-02 15:40 warnes - - * R/qqnorm.aov.R, man/qqnorm.aov.Rd: - Renamed first parameter to - match qqnorm generic. - -2003-01-02 15:14 warnes - - * man/qqnorm.aov.Rd: Added additional help text from Kjeitl. - -2002-12-31 19:50 warnes - - * R/qqnorm.aov.R, man/qqnorm.aov.Rd: Initial checkin of qqnorm.aov - function and documentation submitted by - Kjetil Halvorsen <kj...@ju...>. - -2002-11-04 14:21 warnes - - * R/barplot2.R, man/barplot2.Rd: Updates from Marc Schwartz: - - - Updated underlying code to be based upon the new barplot() in R - v1.6.1 - - This now uses the 'axis.lty' and 'border' arguments - - In R v1.6.0, R Core introduced a new function called axTicks(). - This is an R equivalent of the C code for CreateAtVector in - plot.c. - This now enables me to get the axis tick mark positions - consistently - when the 'height' related axis is either linear or log. Thus, I - can - now have consistent tick marks and can plot grid lines in either - situation. If 'plot.grid = TRUE' and 'grid.inc' is specified, - then - I still use pretty() to determine the tick marks and lines. - - This code now depends on R 1.6.0 or later. - -2002-10-30 02:21 warnes - - * R/plot.lm.R: - Commented out plot.lm() code since recent changes - in R have broken it. - -2002-10-11 18:02 warnes - - * R/barplot2.R: - Fixed log scale errors in legend() call - -2002-10-01 18:16 warnes - - * man/hist2d.Rd: - Added examples of using 'contour' and - 'filled.contour' for display. - -2002-09-24 14:53 warnes - - * R/plotmeans.R: - Changed digits=options("digits") which produces - a list of length 1 - to digits=getOption("digits") which returns a vector of length - one. - The former was causing an error when passed to round(). - -2002-09-23 14:27 warnes - - * trunk/gmodels/man/CrossTable.Rd, trunk/gmodels/man/glh.test.Rd, - man/barplot2.Rd: - Fixed syntax errors in barplot2.Rd and - CrossTable.Rd - - Fixed incorrect translation of 'F' (distribution) to 'FALSE' in - glh.test.Rd - -2002-09-23 13:59 warnes - - * trunk/gdata/R/aggregate.table.R, trunk/gdata/R/combine.R, - trunk/gdata/R/interleave.R, trunk/gdata/R/nobs.R, - trunk/gdata/man/aggregate.table.Rd, trunk/gdata/man/combine.Rd, - trunk/gdata/man/interleave.Rd, trunk/gdata/man/nobs.Rd, - trunk/gdata/man/rename.vars.Rd, trunk/gdata/man/reorder.Rd, - trunk/gmodels/R/ci.R, trunk/gmodels/man/estimable.Rd, - trunk/gmodels/man/glh.test.Rd, R/boxplot.n.R, R/hist2d.R, - R/lowess.R, R/residplot.R, man/bandplot.Rd, man/hist2d.Rd, - man/lowess.Rd, man/plotCI.Rd, man/space.Rd, - trunk/gtools/man/combinations.Rd, trunk/gtools/man/quantcut.Rd: - - Modified all files to include CVS Id and Log tags. - -2002-09-23 13:38 warnes - - * trunk/gmodels/R/CrossTable.R, trunk/gmodels/man/CrossTable.Rd, - R/barplot2.R, man/barplot2.Rd, trunk/gregmisc/DESCRIPTION, - trunk/gtools/R/combinations.R: - Added CrossTable() and - barplot2() code and docs contributed by Marc Schwartz. - - Permit combinations() to be used when r>n provided - repeat.allowed=TRUE - - Bumped up version number - -2002-08-01 19:37 warnes - - * trunk/gmodels/R/ci.R, trunk/gmodels/man/ci.Rd, - trunk/gmodels/man/estimable.Rd, trunk/gmodels/man/glh.test.Rd, - R/hist2d.R, R/wapply.R, trunk/gregmisc/DESCRIPTION, - trunk/gtools/R/running.R: - Corrected documentation mismatch for - ci, ci.default. - - - Replaced all occurences of '_' for assignment with '<-'. - - - Replaced all occurences of 'T' or 'F' for 'TRUE' and 'FALSE' - with - the spelled out version. - - - Updaded version number and date. - -2002-04-09 00:51 warneg - - * trunk/gdata/R/rename.vars.R, trunk/gdata/man/aggregate.table.Rd, - trunk/gdata/man/interleave.Rd, trunk/gdata/man/reorder.Rd, - trunk/gmodels/R/ci.R, trunk/gmodels/R/estimable.R, - trunk/gmodels/R/glh.test.R, trunk/gmodels/man/glh.test.Rd, - R/bandplot.R, R/boxplot.n.R, R/hist2d.R, R/plot.lm.R, R/plotCI.R, - R/plotmeans.R, R/residplot.R, R/space.R, R/wapply.R, - man/bandplot.Rd, man/boxplot.n.Rd, man/hist2d.Rd, - man/plotmeans.Rd, man/space.Rd, man/wapply.Rd, - trunk/gregmisc/DESCRIPTION, trunk/gtools/R/combinations.R, - trunk/gtools/man/combinations.Rd, trunk/gtools/man/running.Rd: - Checkin for version 0.5.3 - -2002-03-27 20:51 warneg - - * man/lowess.Rd: Added "..." argument to lowess.default. - -2002-03-27 19:48 warneg - - * R/lowess.R: - Added code to append "..." to the argument list of - lowess.default. - - - Fixed a wrong default for f in lowess.formula. Was 3, but - should - have been 2/3. - -2002-03-26 21:22 warneg - - * trunk/gdata/man/reorder.Rd, trunk/gmodels/R/ci.R, - trunk/gmodels/R/glh.test.R, trunk/gmodels/man/ci.Rd, - trunk/gmodels/man/glh.test.Rd, R/lowess.R, man/lowess.Rd: - - Changed methods to include '...' to match the generic. - - Updated for version 0.5.1 - -2002-03-26 19:24 warneg - - * man/hist2d.Rd: Initial checkin. - -2002-03-20 04:17 warneg - - * R/plotmeans.R: - Changes to add compatibility with S-Plus 2000 - -2002-03-20 04:16 warneg - - * R/plotCI.R: - Changes to add compatibility with S-Plus 2000. - -2002-03-20 03:48 warneg - - * R/boxplot.n.R: - Updated to work in S-Plus 2000 as well as R. - -2002-03-05 16:44 warneg - - * R/plotmeans.R: - Replace "T" with "TRUE". Problems arrive when - there is a variable named "T". - -2002-02-20 20:09 warneg - - * trunk/gdata/man/rename.vars.Rd, trunk/gmodels/man/ci.Rd, - trunk/gmodels/man/estimable.Rd, trunk/gmodels/man/glh.test.Rd, - man/lowess.Rd, man/plotCI.Rd, man/space.Rd: Minor changes, typo - and formatting fixes. - -2002-02-20 20:06 warneg - - * R/bandplot.R, man/bandplot.Rd: - Generalized to allow - specification of the multiples of the standard deviation levels - to be plotted (0=mean, 1=1 sd, ..). - - Now (invisibly) returnes computed smooths. - -2002-02-16 18:16 warneg - - * man/bandplot.Rd: Added bandplot documentation. - -2002-02-16 17:58 warneg - - * R/wapply.R: - Fixed Bug: When method=="range", the absolute range - of x was being - used to compute the relative width instead of the (correct) - relative - range. - -2002-02-16 17:23 warneg - - * R/wapply.R: - Corrected problem removing missing values: The - missing values of $x - and $y were being removed indepdendently, leaving an uneven - number - of points in the result. - -2002-02-04 23:20 warneg - - * R/space.R: - Add na.rm parameter and make the default TRUE. - -2002-02-04 23:19 warneg - - * R/hist2d.R: Initial checkin. - -2002-02-04 19:12 warneg - - * R/plotCI.R: - When err="x", 'col' was being used to plot bars, - rather than 'barcol'. - -2002-02-04 19:09 warneg - - * R/plotCI.R: - fixed typo, when err="x", lty was 'slty' causing an - error. - -2001-12-12 01:41 warneg - - * man/space.Rd: - Quoted underscore character in my email address. - - Added correct keyword. - -2001-12-12 01:37 warneg - - * man/plotmeans.Rd: Added documentation for xaxt parameter. - -2001-12-12 01:34 warneg - - * R/lowess.R: Updated to explicitly list control arguments to - lowess.formula. - -2001-12-12 01:34 warneg - - * man/lowess.Rd: Initial checkin. Code copied from R source package - and extended. - -2001-12-07 23:34 warneg - - * man/wapply.Rd: Fixed an problem where \code was incorrectly - delimited by parens - rather than curly brackets. - -2001-12-07 22:33 warneg - - * R/lowess.R, R/plot.lm.R, R/residplot.R, man/space.Rd: Initial - checkin. - -2001-12-07 22:24 warneg - - * R/space.R: - Added cvs tags. - -2001-12-07 22:23 warneg - - * R/space.R: - Leave first point at center, rather than shifting by - s/2 to the left. This looks better when there are more than 2 - 'spaced' points. - -2001-12-05 19:49 warneg - - * R/plotmeans.R: - Added ability to use the t-distribution to - compute confidence - intervals. This is controlled using the 'use.t' parameter. - -2001-12-05 19:41 warneg - - * man/plotmeans.Rd: - Added documentation of use.t parameter. - -2001-12-05 19:36 warneg - - * man/wapply.Rd: - Clarified how the width of the window is - computed when method="nobs". - -2001-12-05 19:29 warneg - - * R/wapply.R: - Added a better default for "width" when - method="nobs". For this case, - width=max(5, length(x)/10). - - - Allow omission of x values which result in missing y values via - 'drop.na' parameter. - -2001-10-26 02:48 warneg - - * R/plotmeans.R: Added correct handling of 'xaxt="n"'. - -2001-10-16 23:15 warneg - - * trunk/gmodels/man/ci.Rd, man/wapply.Rd: Fixed unbalanced brace. - -2001-10-16 23:06 warneg - - * man/plotCI.Rd: Added minbar and maxbar parameters. - -2001-10-16 23:04 warneg - - * man/plotmeans.Rd: Forgot to add minbar and maxbar to usage - section. - -2001-10-16 23:03 warneg - - * man/plotmeans.Rd: Added description of minbar and maxbar. - -2001-10-16 23:00 warneg - - * R/plotCI.R: - Added minbar and maxbar parameters - - Added cvs id and log tags to header - -2001-10-16 22:59 warneg - - * R/plotmeans.R: Added cvs id and log tag to file header - -2001-10-16 22:57 warneg - - * R/plotmeans.R: Added minbar and maxbar parameters. - -2001-10-16 22:35 warneg - - * man/plotmeans.Rd: Added description of minsd parameter. - -2001-10-16 22:35 warneg - - * R/plotmeans.R: Added minsd parameter. - -2001-09-18 14:15 warneg - - * R/plotCI.R, R/plotmeans.R, trunk/gregmisc/DESCRIPTION, - trunk/gtools/R/RSCompat.S: Release 0.3.2 - -2001-09-01 00:01 warneg - - * man/wapply.Rd, trunk/gregmisc/DESCRIPTION, - trunk/gtools/R/running.R, trunk/gtools/man/running.Rd: Release - 0.3.0 - -2001-08-31 23:45 warneg - - * R/wapply.R: Used wrong character in header (% instead of #). - Fixed. - -2001-08-31 23:41 warneg - - * R/bandplot.R: Used wrong comment character (% instead of #) in - header. Fixed. - -2001-08-25 05:48 warneg - - * R/wapply.R: Initial checkin. - -2001-08-25 05:46 warneg - - * man/boxplot.n.Rd, man/plotmeans.Rd: Added CVS header. - -2001-08-25 05:45 warneg - - * man/wapply.Rd: Initial Checkin - -2001-05-30 13:23 warneg - - * trunk/gmodels, trunk/gmodels/R, trunk/gmodels/R/ci.R, - trunk/gmodels/man, trunk/gmodels/man/ci.Rd, ., R, R/boxplot.n.R, - R/plotCI.R, R/plotmeans.R, man, man/boxplot.n.Rd, man/plotCI.Rd, - man/plotmeans.Rd, trunk/gregmisc, trunk/gregmisc/DESCRIPTION: - Initial revision - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2009-05-08 22:01:18
|
Revision: 1319 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1319&view=rev Author: warnes Date: 2009-05-08 22:01:12 +0000 (Fri, 08 May 2009) Log Message: ----------- Update Greg's email address to 'gr...@ra...' Modified Paths: -------------- trunk/gplots/man/balloonplot.Rd trunk/gplots/man/bandplot.Rd trunk/gplots/man/boxplot.n.Rd trunk/gplots/man/colorpanel.Rd trunk/gplots/man/hist2d.Rd trunk/gplots/man/ooplot.Rd trunk/gplots/man/overplot.Rd trunk/gplots/man/plot.lm2.Rd trunk/gplots/man/plotCI.Rd trunk/gplots/man/plotmeans.Rd trunk/gplots/man/residplot.Rd trunk/gplots/man/sinkplot.Rd trunk/gplots/man/smartlegend.Rd trunk/gplots/man/space.Rd trunk/gplots/man/textplot.Rd trunk/gplots/man/wapply.Rd Modified: trunk/gplots/man/balloonplot.Rd =================================================================== --- trunk/gplots/man/balloonplot.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/balloonplot.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -118,7 +118,7 @@ \references{Function inspired by question posed on R-help by Ramon Alonso-Allende \email{al...@cn...}.} -\author{ Gregory R. Warnes \email{wa...@bs...} } +\author{ Gregory R. Warnes \email{gr...@ra...} } \seealso{ \code{\link{plot.table}} } Modified: trunk/gplots/man/bandplot.Rd =================================================================== --- trunk/gplots/man/bandplot.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/bandplot.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -60,7 +60,7 @@ \value{ Invisibly returns a list containing the x,y points plotted for each line. } -\author{ Gregory R. Warnes \email{wa...@bs...} +\author{ Gregory R. Warnes \email{gr...@ra...} } \seealso{ \code{\link{wapply}}, \code{\link{lowess}}} \examples{ Modified: trunk/gplots/man/boxplot.n.Rd =================================================================== --- trunk/gplots/man/boxplot.n.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/boxplot.n.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -38,7 +38,7 @@ \item{shrink}{ value to shrink character size (cex) when annotating.} \item{textcolor}{ text color. } } -\author{ Gregory R. Warnes \email{wa...@bs...}} +\author{ Gregory R. Warnes \email{gr...@ra...}} \seealso{ \code{\link{boxplot}}, \code{\link{text}}} \examples{ Modified: trunk/gplots/man/colorpanel.Rd =================================================================== --- trunk/gplots/man/colorpanel.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/colorpanel.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -42,7 +42,7 @@ \value{ Vector of HTML-style RGB colors. } -\author{ Gregory R. Warnes \email{wa...@bs...} } +\author{ Gregory R. Warnes \email{gr...@ra...} } \seealso{ \code{\link[base]{colors} } } \examples{ Modified: trunk/gplots/man/hist2d.Rd =================================================================== --- trunk/gplots/man/hist2d.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/hist2d.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -63,7 +63,7 @@ \item{y}{lower y limit of each bin} } %\references{ ~put references to the literature/web site here ~ } -\author{ Gregory R. Warnes \email{wa...@bs...}} +\author{ Gregory R. Warnes \email{gr...@ra...}} %\note{ ~~further notes~~ } \seealso{ \code{\link{image}}, \code{\link{persp}}, \code{\link{hist}} } Modified: trunk/gplots/man/ooplot.Rd =================================================================== --- trunk/gplots/man/ooplot.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/ooplot.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -157,7 +157,7 @@ midpoints of each \emph{group} of bars, see example. } \author{Lodewijk Bonebakker \email{bon...@co...} with modifications - by Gregory R. Warnes \email{wa...@bs...}. + by Gregory R. Warnes \email{gr...@ra...}. Based on barplot2(). } \seealso{ \code{\link[plot]{plot}}, \code{\link[plot]{boxplot}} } Modified: trunk/gplots/man/overplot.Rd =================================================================== --- trunk/gplots/man/overplot.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/overplot.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -55,7 +55,7 @@ \value{ A copy of the data split by the conditioning variable. } -\author{ Gregory R. Warnes \email{wa...@bs...} } +\author{ Gregory R. Warnes \email{gr...@ra...} } \seealso{ \code{\link[base]{interaction.plot}}, \code{\link[base]{coplot}} for alternative visualizations of 3-way data.} Modified: trunk/gplots/man/plot.lm2.Rd =================================================================== --- trunk/gplots/man/plot.lm2.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/plot.lm2.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -53,7 +53,7 @@ \item{width}{Fraction of the data to use for plot smooths} \item{max.n}{Maximum number of points to display in plots} } -\author{Gregory R. Warnes \email{wa...@bs...} and Nitin +\author{Gregory R. Warnes \email{gr...@ra...} and Nitin Jain \email{nit...@pf...}} \examples{ ctl <- rnorm(100, 4) Modified: trunk/gplots/man/plotCI.Rd =================================================================== --- trunk/gplots/man/plotCI.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/plotCI.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -115,7 +115,7 @@ Sep. 20, 1997. Enhanced version posted to r-help by Ben Bolker \email{be...@zo...} on Apr. 16, 2001. This version was modified and extended by Gregory R. Warnes - \email{wa...@bs...}. Additional changes + \email{gr...@ra...}. Additional changes suggested by Martin Maechler \email{mae...@st...} integrated on July 29, 2004. } Modified: trunk/gplots/man/plotmeans.Rd =================================================================== --- trunk/gplots/man/plotmeans.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/plotmeans.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -137,7 +137,7 @@ } -\author{Gregory R. Warnes \email{wa...@bs...}} +\author{Gregory R. Warnes \email{gr...@ra...}} \seealso{\code{\link{plotCI}}, \code{\link{boxplot}}} Modified: trunk/gplots/man/residplot.Rd =================================================================== --- trunk/gplots/man/residplot.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/residplot.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -20,5 +20,5 @@ These functions are undocumented. Some are internal and not intended for direct use. Others simply haven't been documented yet. } -\author{Gregory R. Warnes \email{wa...@bs...}} +\author{Gregory R. Warnes \email{gr...@ra...}} \keyword{misc} Modified: trunk/gplots/man/sinkplot.Rd =================================================================== --- trunk/gplots/man/sinkplot.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/sinkplot.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -32,7 +32,7 @@ \references{Functionality requested by Kevin Wright \email{kw...@es...} in the R-devel newlist posting \url{https://www.stat.math.ethz.ch/pipermail/r-devel/2004-January/028483.html}} -\author{ Gregory R. Warnes \email{wa...@bs...} } +\author{ Gregory R. Warnes \email{gr...@ra...} } \seealso{ \code{\link[utils]{capture.output}}, \code{\link{textplot}} } \examples{ \dontrun{ Modified: trunk/gplots/man/smartlegend.Rd =================================================================== --- trunk/gplots/man/smartlegend.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/smartlegend.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -23,7 +23,7 @@ \value{ Same as \code{legend} } -\author{Gregory R. Warnes \email{wa...@bs...} } +\author{Gregory R. Warnes \email{gr...@ra...} } \seealso{ \code{\link[base]{legend}} } \examples{ Modified: trunk/gplots/man/space.Rd =================================================================== --- trunk/gplots/man/space.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/space.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -63,7 +63,7 @@ \item{x}{(modified) x location for each input point} \item{y}{y location of each input point} } -\author{ Gregory R. Warnes \email{wa...@bs...} } +\author{ Gregory R. Warnes \email{gr...@ra...} } \seealso{ \code{\link{jitter}}, \code{\link[base]{sunflowerplot}} } \examples{ Modified: trunk/gplots/man/textplot.Rd =================================================================== --- trunk/gplots/man/textplot.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/textplot.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -79,7 +79,7 @@ \value{ The character scaling factor (\code{cex}) used. } -\author{Gregory R. Warnes \email{wa...@bs...}} +\author{Gregory R. Warnes \email{gr...@ra...}} \seealso{ \code{\link{plot}}, \code{\link{text}}, \code{\link[utils]{capture.output}} } Modified: trunk/gplots/man/wapply.Rd =================================================================== --- trunk/gplots/man/wapply.Rd 2009-05-08 21:56:38 UTC (rev 1318) +++ trunk/gplots/man/wapply.Rd 2009-05-08 22:01:12 UTC (rev 1319) @@ -103,7 +103,7 @@ \item{x }{x location'} \item{y }{Result of applying \code{fun} to the window about each x location} } -\author{ Gregory R. Warnes \email{wa...@bs...} +\author{ Gregory R. Warnes \email{gr...@ra...} } \examples{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2009-05-08 21:57:03
|
Revision: 1318 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1318&view=rev Author: warnes Date: 2009-05-08 21:56:38 +0000 (Fri, 08 May 2009) Log Message: ----------- plotCI now properly handles 'NULL' and 'NA' values for ui, li, uiw, and liw. Modified Paths: -------------- trunk/gplots/R/plotCI.R trunk/gplots/man/plotCI.Rd Modified: trunk/gplots/R/plotCI.R =================================================================== --- trunk/gplots/R/plotCI.R 2009-05-08 21:55:05 UTC (rev 1317) +++ trunk/gplots/R/plotCI.R 2009-05-08 21:56:38 UTC (rev 1318) @@ -67,6 +67,12 @@ else z <- x + if(invalid(uiw)) + uiw <- NA + if(invalid(liw)) + liw <- NA + + if(invalid(ui)) ui <- z + uiw if(invalid(li)) Modified: trunk/gplots/man/plotCI.Rd =================================================================== --- trunk/gplots/man/plotCI.Rd 2009-05-08 21:55:05 UTC (rev 1317) +++ trunk/gplots/man/plotCI.Rd 2009-05-08 21:56:38 UTC (rev 1318) @@ -41,18 +41,18 @@ defaults to \code{1:n}.} \item{uiw}{ width of the upper or right error bar. Set to \code{NULL} - omit upper bars.} + or \code{NA} to omit upper bars.} \item{liw}{ width of the lower or left error bar. Defaults to same value as - \code{uiw}. Set to \code{NULL} to omit lower bars. } + \code{uiw}. Set to \code{NULL} or \code{NA} to omit lower bars. } \item{ui}{ upper end of error bars. Defaults to \code{y + uiw} or - \code{x + uiw} depeding on \code{err}. Set to \code{NULL} omit - upper bars. } + \code{x + uiw} depeding on \code{err}. Set to \code{NULL} or + \code{NA} to omit upper bars. } \item{li}{ lower end of error bars. Defaults to \code{y - liw} or - \code{x - liw} depedning on \code{err}. Set to \code{NULL} to omit - lower bars.} + \code{x - liw} depedning on \code{err}. Set to \code{NULL} or + \code{NA} to omit lower bars.} \item{err}{ direction for error bars. Set to "y" for vertical bars. Set to "x" for horizontal bars. Defaults to "y".} @@ -147,6 +147,22 @@ # better yet, just use plotmeans ... # plotmeans( state.area ~ state.region ) +/dontshow{ +## Just for testing + plotCI(x=means, uiw=NA) + plotCI(x=means, uiw=NULL) + plotCI(x=means, uiw=ciw) + plotCI(x=means, uiw=ciw, liw=NULL) + plotCI(x=means, uiw=ciw, liw=NA) + plotCI(x=means, liw=ciw, ciw=NULL) + plotCI(x=means, liw=ciw, ciw=NA) + ciw.na <- ciw + ciw.na[3] <- NA + plotCI(x=means, uiw=ciw.na, liw=ciw) + plotCI(x=means, liw=ciw.na, uiw=ciw) } + +} + \keyword{ hplot } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2009-05-08 21:55:20
|
Revision: 1317 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1317&view=rev Author: warnes Date: 2009-05-08 21:55:05 +0000 (Fri, 08 May 2009) Log Message: ----------- heatmap.2: Add option to create breakpoints symmetric around 0, provide additional information in the return value Modified Paths: -------------- trunk/gplots/R/heatmap.2.R trunk/gplots/man/heatmap.2.Rd trunk/gplots/tests/heatmap2Test.Rout.save Modified: trunk/gplots/R/heatmap.2.R =================================================================== --- trunk/gplots/R/heatmap.2.R 2009-05-08 21:27:55 UTC (rev 1316) +++ trunk/gplots/R/heatmap.2.R 2009-05-08 21:55:05 UTC (rev 1317) @@ -1,164 +1,177 @@ -# $Id$ +## $Id$ heatmap.2 <- function (x, - # dendrogram control - Rowv = TRUE, - Colv=if(symm)"Rowv" else TRUE, - distfun = dist, - hclustfun = hclust, - dendrogram = c("both","row","column","none"), - symm = FALSE, + ## dendrogram control + Rowv = TRUE, + Colv=if(symm)"Rowv" else TRUE, + distfun = dist, + hclustfun = hclust, + dendrogram = c("both","row","column","none"), + symm = FALSE, - # data scaling - scale = c("none","row", "column"), - na.rm=TRUE, + ## data scaling + scale = c("none","row", "column"), + na.rm=TRUE, - # image plot - revC = identical(Colv, "Rowv"), - add.expr, - breaks, - col="heat.colors", + ## image plot + revC = identical(Colv, "Rowv"), + add.expr, - # block sepration - colsep, - rowsep, - sepcolor="white", - sepwidth=c(0.05,0.05), + ## mapping data to colors + breaks, + symbreaks=min(x < 0, na.rm=TRUE) || scale!="none", - # cell labeling - cellnote, - notecex=1.0, - notecol="cyan", - na.color=par("bg"), + ## colors + col="heat.colors", - # level trace - trace=c("column","row","both","none"), - tracecol="cyan", - hline=median(breaks), - vline=median(breaks), - linecol=tracecol, + ## block sepration + colsep, + rowsep, + sepcolor="white", + sepwidth=c(0.05,0.05), - # Row/Column Labeling - margins = c(5, 5), - ColSideColors, - RowSideColors, - cexRow = 0.2 + 1/log10(nr), - cexCol = 0.2 + 1/log10(nc), - labRow = NULL, - labCol = NULL, + ## cell labeling + cellnote, + notecex=1.0, + notecol="cyan", + na.color=par("bg"), - # color key + density info - key = TRUE, - keysize = 1.5, - density.info=c("histogram","density","none"), - denscol=tracecol, - #symkey = TRUE, # should be something like - symkey = min(x < 0, na.rm=TRUE), - densadj = 0.25, + ## level trace + trace=c("column","row","both","none"), + tracecol="cyan", + hline=median(breaks), + vline=median(breaks), + linecol=tracecol, - # plot labels - main = NULL, - xlab = NULL, - ylab = NULL, + ## Row/Column Labeling + margins = c(5, 5), + ColSideColors, + RowSideColors, + cexRow = 0.2 + 1/log10(nr), + cexCol = 0.2 + 1/log10(nc), + labRow = NULL, + labCol = NULL, - # plot layout - lmat = NULL, - lhei = NULL, - lwid = NULL, + ## color key + density info + key = TRUE, + keysize = 1.5, + density.info=c("histogram","density","none"), + denscol=tracecol, + symkey = min(x < 0, na.rm=TRUE) || symbreaks, + densadj = 0.25, - # extras - ... - ) + ## plot labels + main = NULL, + xlab = NULL, + ylab = NULL, + + ## plot layout + lmat = NULL, + lhei = NULL, + lwid = NULL, + + ## extras + ... + ) { scale01 <- function(x, low=min(x), high=max(x) ) { x <- (x-low)/(high - low) x } + + retval <- list() + + scale <- if(symm && missing(scale)) "none" else match.arg(scale) + dendrogram <- match.arg(dendrogram) + trace <- match.arg(trace) + density.info <- match.arg(density.info) - scale <- if(symm && missing(scale)) "none" else match.arg(scale) - dendrogram <- match.arg(dendrogram) - trace <- match.arg(trace) - density.info <- match.arg(density.info) + if(length(col)==1 && is.character(col) ) + col <- get(col, mode="function") - if(!missing(breaks) && (scale!="none")) - warning("Using scale=\"row\" or scale=\"column\" when breaks are", - "specified can produce unpredictable results.", - "Please consider using only one or the other.") + if(!missing(breaks) && (scale!="none")) + warning("Using scale=\"row\" or scale=\"column\" when breaks are", + "specified can produce unpredictable results.", + "Please consider using only one or the other.") - # key & density don't make sense when data is not all on the same scale -# if(scale!="none" && key==TRUE) -# { -# warning("Key cannot be plotted when scale!=\"none\".") -# key=FALSE -# } + ## key & density don't make sense when data is not all on the same scale + ## if(scale!="none" && key==TRUE) + ## { + ## warning("Key cannot be plotted when scale!=\"none\".") + ## key=FALSE + ## } - - - if ( (Colv=="Rowv") && (!isTRUE(Rowv) || is.null(Rowv) ) ) + if ( is.null(Rowv) ) + Rowv <- FALSE + if ( is.null(Colv) ) Colv <- FALSE + else if( Colv=="Rowv" && !isTRUE(Rowv) ) + Colv <- FALSE - if(length(di <- dim(x)) != 2 || !is.numeric(x)) - stop("`x' must be a numeric matrix") + + if(length(di <- dim(x)) != 2 || !is.numeric(x)) + stop("`x' must be a numeric matrix") - nr <- di[1] - nc <- di[2] + nr <- di[1] + nc <- di[2] - if(nr <= 1 || nc <= 1) - stop("`x' must have at least 2 rows and 2 columns") + if(nr <= 1 || nc <= 1) + stop("`x' must have at least 2 rows and 2 columns") - if(!is.numeric(margins) || length(margins) != 2) - stop("`margins' must be a numeric vector of length 2") + if(!is.numeric(margins) || length(margins) != 2) + stop("`margins' must be a numeric vector of length 2") - if(missing(cellnote)) - cellnote <- matrix("", ncol=ncol(x), nrow=nrow(x)) + if(missing(cellnote)) + cellnote <- matrix("", ncol=ncol(x), nrow=nrow(x)) - if(!inherits(Rowv, "dendrogram")) { - ## Check if Rowv and dendrogram arguments are consistent - if ( ( (!isTRUE(Rowv)) || (is.null(Rowv))) && (dendrogram %in% c("both","row") ) ) - { - if (is.logical(Colv) && (Colv)) - dendrogram <- "column" - else - dedrogram <- "none" - - warning("Discrepancy: Rowv is FALSE, while dendrogram is `", - dendrogram, "'. Omitting row dendogram.") - + if(!inherits(Rowv, "dendrogram")) { + ## Check if Rowv and dendrogram arguments are consistent + if ( ( (!isTRUE(Rowv)) || (is.null(Rowv))) && + (dendrogram %in% c("both","row") ) ) + { + if (is.logical(Colv) && (Colv)) + dendrogram <- "column" + else + dedrogram <- "none" + + warning("Discrepancy: Rowv is FALSE, while dendrogram is `", + dendrogram, "'. Omitting row dendogram.") + + } } -} - if(!inherits(Colv, "dendrogram")) { - ## Check if Colv and dendrogram arguments are consistent - if ( ( (!isTRUE(Colv)) || (is.null(Colv))) - && (dendrogram %in% c("both","column")) ) - { - if (is.logical(Rowv) && (Rowv)) - dendrogram <- "row" - else - dendrogram <- "none" - - warning("Discrepancy: Colv is FALSE, while dendrogram is `", - dendrogram, "'. Omitting column dendogram.") - } -} + if(!inherits(Colv, "dendrogram")) { + ## Check if Colv and dendrogram arguments are consistent + if ( ( (!isTRUE(Colv)) || (is.null(Colv))) + && (dendrogram %in% c("both","column")) ) + { + if (is.logical(Rowv) && (Rowv)) + dendrogram <- "row" + else + dendrogram <- "none" + + warning("Discrepancy: Colv is FALSE, while dendrogram is `", + dendrogram, "'. Omitting column dendogram.") + } + } ## by default order by row/col mean ## if(is.null(Rowv)) Rowv <- rowMeans(x, na.rm = na.rm) ## if(is.null(Colv)) Colv <- colMeans(x, na.rm = na.rm) - ## get the dendrograms and reordering indices + ## get the dendrograms and reordering indices - ## if( dendrogram %in% c("both","row") ) - ## { ## dendrogram option is used *only* for display purposes + ## if( dendrogram %in% c("both","row") ) + ## { ## dendrogram option is used *only* for display purposes if(inherits(Rowv, "dendrogram")) { ddr <- Rowv ## use Rowv 'as-is', when it is dendrogram rowInd <- order.dendrogram(ddr) } -else if (is.integer(Rowv)) + else if (is.integer(Rowv)) { ## Compute dendrogram and do reordering based on given vector hcr <- hclustfun(distfun(x)) ddr <- as.dendrogram(hcr) @@ -208,308 +221,342 @@ if(nc != length(colInd)) stop("column dendrogram ordering gave index of wrong length") } -else if (isTRUE(Colv)) - {## If TRUE, compute dendrogram and do reordering based on rowMeans - Colv <- colMeans(x, na.rm = na.rm) - hcc <- hclustfun(distfun(if(symm)x else t(x))) - ddc <- as.dendrogram(hcc) - ddc <- reorder(ddc, Colv) + else if (isTRUE(Colv)) + {## If TRUE, compute dendrogram and do reordering based on rowMeans + Colv <- colMeans(x, na.rm = na.rm) + hcc <- hclustfun(distfun(if(symm)x else t(x))) + ddc <- as.dendrogram(hcc) + ddc <- reorder(ddc, Colv) - colInd <- order.dendrogram(ddc) - if(nc != length(colInd)) - stop("column dendrogram ordering gave index of wrong length") - } -else - { - colInd <- 1:nc - } + colInd <- order.dendrogram(ddc) + if(nc != length(colInd)) + stop("column dendrogram ordering gave index of wrong length") + } + else + { + colInd <- 1:nc + } + + retval$rowInd <- rowInd + retval$colInd <- colInd + retval$call <- match.call() + - ## reorder x & cellnote - x <- x[rowInd, colInd] - x.unscaled <- x - cellnote <- cellnote[rowInd, colInd] + ## reorder x & cellnote + x <- x[rowInd, colInd] + x.unscaled <- x + cellnote <- cellnote[rowInd, colInd] - if(is.null(labRow)) - labRow <- if(is.null(rownames(x))) (1:nr)[rowInd] else rownames(x) - else - labRow <- labRow[rowInd] + if(is.null(labRow)) + labRow <- if(is.null(rownames(x))) (1:nr)[rowInd] else rownames(x) + else + labRow <- labRow[rowInd] - if(is.null(labCol)) - labCol <- if(is.null(colnames(x))) (1:nc)[colInd] else colnames(x) - else - labCol <- labCol[colInd] + if(is.null(labCol)) + labCol <- if(is.null(colnames(x))) (1:nc)[colInd] else colnames(x) + else + labCol <- labCol[colInd] - if(scale == "row") { - x <- sweep(x, 1, rowMeans(x, na.rm = na.rm)) - sx <- apply(x, 1, sd, na.rm = na.rm) - x <- sweep(x, 1, sx, "/") - } - else if(scale == "column") { - x <- sweep(x, 2, colMeans(x, na.rm = na.rm)) - sx <- apply(x, 2, sd, na.rm = na.rm) - x <- sweep(x, 2, sx, "/") - } + if(scale == "row") { + retval$rowMeans <- rm <- rowMeans(x, na.rm = na.rm) + x <- sweep(x, 1, rm) + retval$rowSDs <- sx <- apply(x, 1, sd, na.rm = na.rm) + x <- sweep(x, 1, sx, "/") + } + else if(scale == "column") { + retval$colMeans <- rm <- colMeans(x, na.rm = na.rm) + x <- sweep(x, 2, rm) + retval$colSDs <- sx <- apply(x, 2, sd, na.rm = na.rm) + x <- sweep(x, 2, sx, "/") + } - ## Set up breaks and force values outside the range into the endmost bins - if(missing(breaks) || is.null(breaks) || length(breaks)<1 ) - if(missing(col)) + ## Set up breaks and force values outside the range into the endmost bins + if(missing(breaks) || is.null(breaks) || length(breaks)<1 ) + { + if( missing(col) || is.function(col) ) breaks <- 16 - else + else breaks <- length(col)+1 - if(length(breaks)==1) - { + } + + if(length(breaks)==1) + { + if(!symbreaks) breaks <- seq( min(x, na.rm=na.rm), max(x,na.rm=na.rm), length=breaks) - } + else + { + extreme <- max(abs(x), na.rm=TRUE) + breaks <- seq( -extreme, extreme, length=breaks ) + } + } - nbr <- length(breaks) - ncol <- length(breaks)-1 + nbr <- length(breaks) + ncol <- length(breaks)-1 - if(class(col)=="function") - col <- col(ncol) - else if(is.character(col) && length(col)==1) - col <- do.call(col,list(ncol)) + if(class(col)=="function") + col <- col(ncol) - min.breaks <- min(breaks) - max.breaks <- max(breaks) + min.breaks <- min(breaks) + max.breaks <- max(breaks) - x[] <- ifelse(x<min.breaks, min.breaks, x) - x[] <- ifelse(x>max.breaks, max.breaks, x) + x[x<min.breaks] <- min.breaks + x[x>max.breaks] <- max.breaks - - + ## Calculate the plot layout + if( missing(lhei) || is.null(lhei) ) + lhei <- c(keysize, 4) - - ## Calculate the plot layout - if( missing(lhei) || is.null(lhei) ) - lhei <- c(keysize, 4) + if( missing(lwid) || is.null(lwid) ) + lwid <- c(keysize, 4) - if( missing(lwid) || is.null(lwid) ) - lwid <- c(keysize, 4) + if( missing(lmat) || is.null(lmat) ) + { + lmat <- rbind(4:3, 2:1) + + if(!missing(ColSideColors)) { ## add middle row to layout + if(!is.character(ColSideColors) || length(ColSideColors) != nc) + stop("'ColSideColors' must be a character vector of length ncol(x)") + lmat <- rbind(lmat[1,]+1, c(NA,1), lmat[2,]+1) + lhei <- c(lhei[1], 0.2, lhei[2]) + } - if( missing(lmat) || is.null(lmat) ) - { - lmat <- rbind(4:3, 2:1) - - if(!missing(ColSideColors)) { ## add middle row to layout - if(!is.character(ColSideColors) || length(ColSideColors) != nc) - stop("'ColSideColors' must be a character vector of length ncol(x)") - lmat <- rbind(lmat[1,]+1, c(NA,1), lmat[2,]+1) - lhei <- c(lhei[1], 0.2, lhei[2]) - } + if(!missing(RowSideColors)) { ## add middle column to layout + if(!is.character(RowSideColors) || length(RowSideColors) != nr) + stop("'RowSideColors' must be a character vector of length nrow(x)") + lmat <- cbind(lmat[,1]+1, c(rep(NA, nrow(lmat)-1), 1), lmat[,2]+1) + lwid <- c(lwid[1], 0.2, lwid[2]) + } - if(!missing(RowSideColors)) { ## add middle column to layout - if(!is.character(RowSideColors) || length(RowSideColors) != nr) - stop("'RowSideColors' must be a character vector of length nrow(x)") - lmat <- cbind(lmat[,1]+1, c(rep(NA, nrow(lmat)-1), 1), lmat[,2]+1) - lwid <- c(lwid[1], 0.2, lwid[2]) - } + lmat[is.na(lmat)] <- 0 + } + + if(length(lhei) != nrow(lmat)) + stop("lhei must have length = nrow(lmat) = ", nrow(lmat)) - lmat[is.na(lmat)] <- 0 - } - - if(length(lhei) != nrow(lmat)) - stop("lhei must have length = nrow(lmat) = ", nrow(lmat)) + if(length(lwid) != ncol(lmat)) + stop("lwid must have length = ncol(lmat) =", ncol(lmat)) - if(length(lwid) != ncol(lmat)) - stop("lwid must have length = ncol(lmat) =", ncol(lmat)) + ## Graphics `output' ----------------------- - ## Graphics `output' ----------------------- + op <- par(no.readonly = TRUE) + on.exit(par(op)) + layout(lmat, widths = lwid, heights = lhei, respect = FALSE) - op <- par(no.readonly = TRUE) - on.exit(par(op)) - layout(lmat, widths = lwid, heights = lhei, respect = FALSE) - - ## draw the side bars - if(!missing(RowSideColors)) { - par(mar = c(margins[1],0, 0,0.5)) - image(rbind(1:nr), col = RowSideColors[rowInd], axes = FALSE) + ## draw the side bars + if(!missing(RowSideColors)) { + par(mar = c(margins[1],0, 0,0.5)) + image(rbind(1:nr), col = RowSideColors[rowInd], axes = FALSE) + } + if(!missing(ColSideColors)) { + par(mar = c(0.5,0, 0,margins[2])) + image(cbind(1:nc), col = ColSideColors[colInd], axes = FALSE) + } + ## draw the main carpet + par(mar = c(margins[1], 0, 0, margins[2])) + if(!symm || scale != "none") + { + x <- t(x) + cellnote <- t(cellnote) } - if(!missing(ColSideColors)) { - par(mar = c(0.5,0, 0,margins[2])) - image(cbind(1:nc), col = ColSideColors[colInd], axes = FALSE) + if(revC) + { ## x columns reversed + iy <- nr:1 + if(exists("ddr")) + ddr <- rev(ddr) + x <- x[,iy] + cellnote <- cellnote[,iy] } - ## draw the main carpet - par(mar = c(margins[1], 0, 0, margins[2])) - if(!symm || scale != "none") - { - x <- t(x) - cellnote <- t(cellnote) - } - if(revC) - { # x columns reversed - iy <- nr:1 - ddr <- rev(ddr) - x <- x[,iy] - cellnote <- cellnote[,iy] - } - else iy <- 1:nr + else iy <- 1:nr - image(1:nc, 1:nr, x, xlim = 0.5+ c(0, nc), ylim = 0.5+ c(0, nr), - axes = FALSE, xlab = "", ylab = "", col=col, breaks=breaks, - ...) + ## display the main carpet + image(1:nc, 1:nr, x, xlim = 0.5+ c(0, nc), ylim = 0.5+ c(0, nr), + axes = FALSE, xlab = "", ylab = "", col=col, breaks=breaks, + ...) + retval$carpet <- x + if(exists("ddr")) + retval$rowDendrogram <- ddr + if(exists("ddc")) + retval$colDendrogram <- ddc + retval$breaks <- breaks + retval$col <- col + + ## fill 'na' positions with na.color + if(!invalid(na.color) & any(is.na(x))) + { + mmat <- ifelse(is.na(x), 1, NA) + image(1:nc, 1:nr, mmat, axes = FALSE, xlab = "", ylab = "", + col=na.color, add=TRUE) + } - if(!invalid(na.color) & any(is.na(x))) - { - mmat <- ifelse(is.na(x), 1, NA) - image(1:nc, 1:nr, mmat, axes = FALSE, xlab = "", ylab = "", - col=na.color, add=TRUE) - } + ## add labels + axis(1, 1:nc, labels= labCol, las= 2, line= -0.5, tick= 0, cex.axis= cexCol) + if(!is.null(xlab)) mtext(xlab, side = 1, line = margins[1] - 1.25) + axis(4, iy, labels= labRow, las= 2, line= -0.5, tick= 0, cex.axis= cexRow) + if(!is.null(ylab)) mtext(ylab, side = 4, line = margins[2] - 1.25) + ## perform user-specified function + if (!missing(add.expr)) + eval(substitute(add.expr)) - axis(1, 1:nc, labels= labCol, las= 2, line= -0.5, tick= 0, cex.axis= cexCol) - if(!is.null(xlab)) mtext(xlab, side = 1, line = margins[1] - 1.25) - axis(4, iy, labels= labRow, las= 2, line= -0.5, tick= 0, cex.axis= cexRow) - if(!is.null(ylab)) mtext(ylab, side = 4, line = margins[2] - 1.25) + ## add 'background' colored spaces to visually separate sections + if(!missing(colsep)) + for(csep in colsep) + rect(xleft =csep+0.5, ybottom=rep(0,length(csep)), + xright=csep+0.5+sepwidth[1], ytop=rep(ncol(x)+1,csep), + lty=1, lwd=1, col=sepcolor, border=sepcolor) - if (!missing(add.expr)) - eval(substitute(add.expr)) + if(!missing(rowsep)) + for(rsep in rowsep) + rect(xleft =0, ybottom= (ncol(x)+1-rsep)-0.5, + xright=nrow(x)+1, ytop = (ncol(x)+1-rsep)-0.5 - sepwidth[2], + lty=1, lwd=1, col=sepcolor, border=sepcolor) - ## add 'background' colored spaces to visually separate sections - if(!missing(colsep)) - for(csep in colsep) - rect(xleft =csep+0.5, ybottom=rep(0,length(csep)), - xright=csep+0.5+sepwidth[1], ytop=rep(ncol(x)+1,csep), - lty=1, lwd=1, col=sepcolor, border=sepcolor) + + ## show traces + min.scale <- min(breaks) + max.scale <- max(breaks) + x.scaled <- scale01(t(x), min.scale, max.scale) - if(!missing(rowsep)) - for(rsep in rowsep) - rect(xleft =0, ybottom= (ncol(x)+1-rsep)-0.5, - xright=nrow(x)+1, ytop = (ncol(x)+1-rsep)-0.5 - sepwidth[2], - lty=1, lwd=1, col=sepcolor, border=sepcolor) + if(trace %in% c("both","column") ) + { + retval$vline <- vline + vline.vals <- scale01(vline, min.scale, max.scale) + for( i in colInd ) + { + if(!is.null(vline)) + { + abline(v=i-0.5 + vline.vals, col=linecol, lty=2) + } + xv <- rep(i, nrow(x.scaled)) + x.scaled[,i] - 0.5 + xv <- c(xv[1], xv) + yv <- 1:length(xv)-0.5 + lines(x=xv, y=yv, lwd=1, col=tracecol, type="s") + } + } - # show traces - min.scale <- min(breaks) - max.scale <- max(breaks) - x.scaled <- scale01(t(x), min.scale, max.scale) + if(trace %in% c("both","row") ) + { + retval$hline <- hline + hline.vals <- scale01(hline, min.scale, max.scale) + for( i in rowInd ) + { + if(!is.null(hline)) + { + abline(h=i + hline, col=linecol, lty=2) + } + yv <- rep(i, ncol(x.scaled)) + x.scaled[i,] - 0.5 + yv <- rev(c(yv[1], yv)) + xv <- length(yv):1-0.5 + lines(x=xv, y=yv, lwd=1, col=tracecol, type="s") + } + } - if(trace %in% c("both","column") ) - { - for( i in colInd ) - { - if(!is.null(vline)) - { - vline.vals <- scale01(vline, min.scale, max.scale) - abline(v=i-0.5 + vline.vals, col=linecol, lty=2) - } - xv <- rep(i, nrow(x.scaled)) + x.scaled[,i] - 0.5 - xv <- c(xv[1], xv) - yv <- 1:length(xv)-0.5 - lines(x=xv, y=yv, lwd=1, col=tracecol, type="s") - } - } - - if(trace %in% c("both","row") ) - { - for( i in rowInd ) - { - if(!is.null(hline)) - { - hline.vals <- scale01(hline, min.scale, max.scale) - abline(h=i + hline, col=linecol, lty=2) - } - yv <- rep(i, ncol(x.scaled)) + x.scaled[i,] - 0.5 - yv <- rev(c(yv[1], yv)) - xv <- length(yv):1-0.5 - lines(x=xv, y=yv, lwd=1, col=tracecol, type="s") - } - } + if(!missing(cellnote)) + text(x=c(row(cellnote)), + y=c(col(cellnote)), + labels=c(cellnote), + col=notecol, + cex=notecex) + ## the two dendrograms : + par(mar = c(margins[1], 0, 0, 0)) + if( dendrogram %in% c("both","row") ) + { + plot(ddr, horiz = TRUE, axes = FALSE, yaxs = "i", leaflab = "none") + } + else + plot.new() - if(!missing(cellnote)) - text(x=c(row(cellnote)), - y=c(col(cellnote)), - labels=c(cellnote), - col=notecol, - cex=notecex) + par(mar = c(0, 0, if(!is.null(main)) 5 else 0, margins[2])) - ## the two dendrograms : - par(mar = c(margins[1], 0, 0, 0)) - if( dendrogram %in% c("both","row") ) - { - plot(ddr, horiz = TRUE, axes = FALSE, yaxs = "i", leaflab = "none") - } - else - plot.new() + if( dendrogram %in% c("both","column") ) + { + plot(ddc, axes = FALSE, xaxs = "i", leaflab = "none") + } + else + plot.new() - par(mar = c(0, 0, if(!is.null(main)) 5 else 0, margins[2])) + ## title + if(!is.null(main)) title(main, cex.main = 1.5*op[["cex.main"]]) - if( dendrogram %in% c("both","column") ) - { - plot(ddc, axes = FALSE, xaxs = "i", leaflab = "none") - } - else - plot.new() + ## Add the color-key + if(key) + { + par(mar = c(5, 4, 2, 1), cex=0.75) + tmpbreaks <- breaks - ## title - if(!is.null(main)) title(main, cex.main = 1.5*op[["cex.main"]]) + if(symkey) + { + max.raw <- max(abs(c(x,breaks)),na.rm=TRUE) + min.raw <- -max.raw + tmpbreaks[1] <- -max(abs(x)) + tmpbreaks[length(tmpbreaks)] <- max(abs(x)) + } + else + { + min.raw <- min(x, na.rm=TRUE) ## Again, modified to use scaled + max.raw <- max(x, na.rm=TRUE) ## or unscaled (SD 12/2/03) + } - ## Add the color-key - if(key) - { - par(mar = c(5, 4, 2, 1), cex=0.75) + z <- seq(min.raw, max.raw, length=length(col)) + image(z=matrix(z, ncol=1), + col=col, breaks=tmpbreaks, + xaxt="n", yaxt="n") - if(symkey) - { - max.raw <- max(abs(x),na.rm=TRUE) - min.raw <- -max.raw - } - else - { - min.raw <- min(x, na.rm=TRUE) # Again, modified to use scaled - max.raw <- max(x, na.rm=TRUE) # or unscaled (SD 12/2/03) - } + par(usr=c(0,1,0,1)) + lv <- pretty(breaks) + xv <- scale01(as.numeric(lv), min.raw, max.raw) + axis(1, at=xv, labels=lv) + if(scale=="row") + mtext(side=1,"Row Z-Score", line=2) + else if(scale=="column") + mtext(side=1,"Column Z-Score", line=2) + else + mtext(side=1,"Value", line=2) - z <- seq(min.raw,max.raw,length=length(col)) - image(z=matrix(z, ncol=1), - col=col, breaks=breaks, - xaxt="n", yaxt="n" ) + if(density.info=="density") + { + ## Experimental : also plot density of data + dens <- density(x, adjust=densadj, na.rm=TRUE) + omit <- dens$x < min(breaks) | dens$x > max(breaks) + dens$x <- dens$x[-omit] + dens$y <- dens$y[-omit] + dens$x <- scale01(dens$x,min.raw,max.raw) + lines(dens$x, dens$y / max(dens$y) * 0.95, col=denscol, lwd=1) + axis(2, at=pretty(dens$y)/max(dens$y) * 0.95, pretty(dens$y) ) + title("Color Key\nand Density Plot") + par(cex=0.5) + mtext(side=2,"Density", line=2) + } + else if(density.info=="histogram") + { + h <- hist(x, plot=FALSE, breaks=breaks) + hx <- scale01(breaks,min.raw,max.raw) + hy <- c(h$counts, h$counts[length(h$counts)]) + lines(hx, hy/max(hy)*0.95, lwd=1, type="s", col=denscol) + axis(2, at=pretty(hy)/max(hy) * 0.95, pretty(hy) ) + title("Color Key\nand Histogram") + par(cex=0.5) + mtext(side=2,"Count", line=2) + } + else + title("Color Key") - par(usr=c(0,1,0,1)) - lv <- pretty(breaks) - xv <- scale01(as.numeric(lv), min.raw, max.raw) - axis(1, at=xv, labels=lv) - if(scale=="row") - mtext(side=1,"Row Z-Score", line=2) - else if(scale=="column") - mtext(side=1,"Column Z-Score", line=2) - else - mtext(side=1,"Value", line=2) + } + else + plot.new() - if(density.info=="density") - { - # Experimental : also plot density of data - dens <- density(x, adjust=densadj, na.rm=TRUE) - omit <- dens$x < min(breaks) | dens$x > max(breaks) - dens$x <- dens$x[-omit] - dens$y <- dens$y[-omit] - dens$x <- scale01(dens$x,min.raw,max.raw) - lines(dens$x, dens$y / max(dens$y) * 0.95, col=denscol, lwd=1) - axis(2, at=pretty(dens$y)/max(dens$y) * 0.95, pretty(dens$y) ) - title("Color Key\nand Density Plot") - par(cex=0.5) - mtext(side=2,"Density", line=2) - } - else if(density.info=="histogram") - { - h <- hist(x, plot=FALSE, breaks=breaks) - hx <- scale01(breaks,min.raw,max.raw) - hy <- c(h$counts, h$counts[length(h$counts)]) - lines(hx, hy/max(hy)*0.95, lwd=1, type="s", col=denscol) - axis(2, at=pretty(hy)/max(hy) * 0.95, pretty(hy) ) - title("Color Key\nand Histogram") - par(cex=0.5) - mtext(side=2,"Count", line=2) - } - else - title("Color Key") + ## Create a table showing how colors match to (transformed) data ranges + retval$colorTable <- data.frame( + low=retval$breaks[-length(retval$breaks)], + high=retval$breaks[-1], + color=retval$col + ) - } - else - plot.new() - - invisible(list(rowInd = rowInd, colInd = colInd)) + + invisible( retval ) } Modified: trunk/gplots/man/heatmap.2.Rd =================================================================== --- trunk/gplots/man/heatmap.2.Rd 2009-05-08 21:27:55 UTC (rev 1316) +++ trunk/gplots/man/heatmap.2.Rd 2009-05-08 21:55:05 UTC (rev 1317) @@ -1,85 +1,92 @@ \name{heatmap.2} \alias{heatmap.2} -\title{ Draw a Heat Map } +\title{ Enhanced Heat Map } \description{ A heat map is a false color image (basically \code{\link{image}(t(x))}) with a dendrogram added to the left side and/or to the top. Typically, reordering of the rows and columns according to some set of values (row or column means) within the restrictions imposed by the dendrogram is carried out. + + This heatmap provides a number of extensions to the standard R + \code{\link[stats]{heatmap}} function. } \usage{ heatmap.2 (x, - # dendrogram control - Rowv = TRUE, - Colv=if(symm)"Rowv" else TRUE, - distfun = dist, - hclustfun = hclust, - dendrogram = c("both","row","column","none"), - symm = FALSE, + # dendrogram control + Rowv = TRUE, + Colv=if(symm)"Rowv" else TRUE, + distfun = dist, + hclustfun = hclust, + dendrogram = c("both","row","column","none"), + symm = FALSE, - # data scaling - scale = c("none","row", "column"), - na.rm=TRUE, + # data scaling + scale = c("none","row", "column"), + na.rm=TRUE, - # image plot - revC = identical(Colv, "Rowv"), - add.expr, - breaks, - col="heat.colors", + # image plot + revC = identical(Colv, "Rowv"), + add.expr, - # block sepration - colsep, - rowsep, - sepcolor="white", - sepwidth=c(0.05,0.05), + # mapping data to colors + breaks, + symbreaks=min(x < 0, na.rm=TRUE) || scale!="none", - # cell labeling - cellnote, - notecex=1.0, - notecol="cyan", - na.color=par("bg"), + # colors + col="heat.colors", - # level trace - trace=c("column","row","both","none"), - tracecol="cyan", - hline=median(breaks), - vline=median(breaks), - linecol=tracecol, + # block sepration + colsep, + rowsep, + sepcolor="white", + sepwidth=c(0.05,0.05), - # Row/Column Labeling - margins = c(5, 5), - ColSideColors, - RowSideColors, - cexRow = 0.2 + 1/log10(nr), - cexCol = 0.2 + 1/log10(nc), - labRow = NULL, - labCol = NULL, + # cell labeling + cellnote, + notecex=1.0, + notecol="cyan", + na.color=par("bg"), - # color key + density info - key = TRUE, - keysize = 1.5, - density.info=c("histogram","density","none"), - denscol=tracecol, - #symkey = TRUE, # should be something like - symkey = min(x < 0, na.rm=TRUE), - densadj = 0.25, + # level trace + trace=c("column","row","both","none"), + tracecol="cyan", + hline=median(breaks), + vline=median(breaks), + linecol=tracecol, - # plot labels - main = NULL, - xlab = NULL, - ylab = NULL, + # Row/Column Labeling + margins = c(5, 5), + ColSideColors, + RowSideColors, + cexRow = 0.2 + 1/log10(nr), + cexCol = 0.2 + 1/log10(nc), + labRow = NULL, + labCol = NULL, - # plot layout - lmat = NULL, - lhei = NULL, - lwid = NULL, + # color key + density info + key = TRUE, + keysize = 1.5, + density.info=c("histogram","density","none"), + denscol=tracecol, + symkey = min(x < 0, na.rm=TRUE) || symbreaks, + densadj = 0.25, - # extras - ... - ) - } + # plot labels + main = NULL, + xlab = NULL, + ylab = NULL, + + # plot layout + lmat = NULL, + lhei = NULL, + lwid = NULL, + + # extras + ... + ) + } \arguments{ % Dendogram Control \item{x}{numeric matrix of the values to be plotted. } @@ -121,6 +128,9 @@ splitting points for binning \code{x} into colors, or a integer number of break points to be used, in which case the break points will be spaced equally between \code{min(x)} and \code{max(x)}.} + \item{symbreaks}{Boolean indicating whether breaks should be + made symmetric about 0. Defaults to \code{TRUE} if the data includes + negative values, and to \code{FALSE} otherwise.} \item{col}{colors used for the image. Defaults to heat colors (\code{heat.colors}).} % block separation @@ -178,7 +188,8 @@ display specified by \code{density.info}, defaults to the same value as \code{tracecol}.} \item{symkey}{Boolean indicating whether the color key should be - made symmetric about 0. Defaults to \code{TRUE}.} + made symmetric about 0. Defaults to \code{TRUE} if the data includes + negative values, and to \code{FALSE} otherwise.} \item{densadj}{Numeric scaling value for tuning the kernel width when a density plot is drawn on the color key. (See the \code{adjust} parameter for the \code{density} function for details.) Defaults to @@ -244,9 +255,26 @@ } \value{ Invisibly, a list with components - \item{rowInd}{\bold{r}ow index permutation vector as returned by + \item{rowInd}{row index permutation vector as returned by \code{\link{order.dendrogram}}.} - \item{colInd}{\bold{c}olumn index permutation vector.} + \item{colInd}{column index permutation vector.} + \item{call}{the matched call} + \item{rowMeans, rowSDs}{mean and standard deviation of each row: only + present if \code{scale="row"}} + \item{colMeans, colSDs}{mean and standard deviation of each column: only + present if \code{scale="column"}} + \item{carpet}{reordered and scaled 'x' values used generate the main + 'carpet'} + \item{rowDendrogram}{row dendrogram, if present} + \item{colDendrogram}{column dendrogram, if present} + \item{breaks}{values used for color break points} + \item{col}{colors used} + \item{vline}{center-line value used for column trace, present only if + \code{trace="both"} or \code{trace="column"} } + \item{hline}{center-line value used for row trace, present only if + \code{trace="both"} or \code{trace="row"} } + \item{colorTable}{A three-column data frame providing the lower and upper + bound and color for each bin} } \author{Andy Liaw, original; R. Gentleman, M. Maechler, W. Huber, G. Warnes, revisions.} @@ -260,6 +288,9 @@ rc <- rainbow(nrow(x), start=0, end=.3) cc <- rainbow(ncol(x), start=0, end=.3) + ## + ## demonstrate the effect of row and column dendogram options + ## heatmap.2(x) ## default - dendrogram plotted and reordering done. heatmap.2(x, dendrogram="none") ## no dendrogram plotted, but reordering done. heatmap.2(x, dendrogram="row") ## row dendrogram plotted and row reordering done. @@ -267,22 +298,45 @@ heatmap.2(x, keysize=2) ## default - dendrogram plotted and reordering done. - heatmap.2(x, Rowv=FALSE, dendrogram="both") ## generate warning! heatmap.2(x, Rowv=NULL, dendrogram="both") ## generate warning! heatmap.2(x, Colv=FALSE, dendrogram="both") ## generate warning! + ## + ## Show effect of z-score scaling within columns, blue-red color scale + ## + hv <- heatmap.2(x, col=bluered, scale="column", tracecol="#303030") + ### + ## Look at the return values + ### + names(hv) + ## Show the mapping of z-score values to color bins + hv$colorTable - hv <- heatmap.2(x, col=cm.colors(256), scale="column", + ## Extract the range associated with white + hv$colorTable[hv$colorTable[,"color"]=="#FFFFFF",] + + ## Determine the original data values that map to white + whiteBin <- unlist(hv$colorTable[hv$colorTable[,"color"]=="#FFFFFF",1:2]) + rbind(whiteBin[1] * hv$colSDs + hv$colMeans, + whiteBin[2] * hv$colSDs + hv$colMeans ) + ## + ## A more decorative heatmap, with z-score scaling along columns + ## + hv <- heatmap.2(x, col=cm.colors(255), scale="column", RowSideColors=rc, ColSideColors=cc, margin=c(5, 10), xlab="specification variables", ylab= "Car Models", main="heatmap(<Mtcars data>, ..., scale=\"column\")", tracecol="green", density="density") + ## Note that the breakpoints are now symmetric about 0 - str(hv) # the two re-ordering index vectors + + + + %% want example using the `add.exp' argument! data(attitude) Modified: trunk/gplots/tests/heatmap2Test.Rout.save =================================================================== --- trunk/gplots/tests/heatmap2Test.Rout.save 2009-05-08 21:27:55 UTC (rev 1316) +++ trunk/gplots/tests/heatmap2Test.Rout.save 2009-05-08 21:55:05 UTC (rev 1317) @@ -1,6 +1,6 @@ -R version 2.6.0 (2007-10-03) -Copyright (C) 2007 The R Foundation for Statistical Computing +R version 2.9.0 (2009-04-17) +Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -18,6 +18,9 @@ > library(gplots) Loading required package: gtools Loading required package: gdata +Loading required package: caTools +Loading required package: bitops +Loading required package: grid Attaching package: 'gplots' @@ -112,8 +115,108 @@ + tracecol="green", density="density") > > str(hv) # the two re-ordering index vectors -List of 2 - $ rowInd: int [1:32] 31 17 16 15 5 25 29 24 7 6 ... - $ colInd: int [1:11] 2 9 8 11 6 5 10 7 1 4 ... +List of 12 + $ rowInd : int [1:32] 31 17 16 15 5 25 29 24 7 6 ... + $ colInd : int [1:11] 2 9 8 11 6 5 10 7 1 4 ... + $ call : language heatmap.2(x = x, scale = "column", col = cm.colors(256), tracecol = "green", margins = c(5, 10), ColSideColors = cc, RowSideColors = rc, ... + $ colMeans : Named num [1:11] 6.188 0.406 0.438 2.812 3.217 ... + ..- attr(*, "names")= chr [1:11] "cyl" "am" "vs" "carb" ... + $ colSDs : Named num [1:11] 1.786 0.499 0.504 1.615 0.978 ... + ..- attr(*, "names")= chr [1:11] "cyl" "am" "vs" "carb" ... + $ carpet : num [1:11, 1:32] 1.015 1.19 -0.868 3.212 0.361 ... + ..- attr(*, "dimnames")=List of 2 + .. ..$ : chr [1:11] "cyl" "am" "vs" "carb" ... + .. ..$ : chr [1:32] "Maserati Bora" "Chrysler Imperial" "Lincoln Continental" "Cadillac Fleetwood" ... + $ rowDendrogram: ..--[dendrogram w/ 2 branches and 32 members at h = 425, midpoint = 8.58, value = 1267] + .. |--[dendrogram w/ 2 branches and 9 members at h = 215, midpoint = 1.84, value = 552] + .. | |--leaf "Maserati Bora" ( value.Maserati Bora = 63.2 ) + .. | `--[dendrogram w/ 2 branches and 8 members at h = 135, midpoint = 2.69, value = 489] + .. | |--[dendrogram w/ 2 branches and 3 members at h = 40.8, midpoint = 0.75, value = 198] + .. | | |--leaf "Chrysler Imperial" ( value.Chrysler Imperial = 66 ) + .. | | `--[dendrogram w/ 2 branches and 2 members at h = 15.6, midpoint = 0.5, value = 132] + .. | | |--leaf "Lincoln Continental" ( value.Lincoln Continental = 66 ) + .. | | `--leaf "Cadillac Fleetwood" ( value.Cadillac Fleetwood = 66.2 ) + .. | `--[dendrogram w/ 2 branches and 5 members at h = 102, midpoint = 1.62, value = 290] + .. | |--[dendrogram w/ 2 branches and 2 members at h = 40, midpoint = 0.5, value = 111] + .. | | |--leaf "Hornet Sportabout" ( value.Hornet Sportabout = 53.7 ) + .. | | `--leaf "Pontiac Firebird" ( value.Pontiac Firebird = 57.4 ) + .. | `--[dendrogram w/ 2 branches and 3 members at h = 21.3, midpoint = 0.75, value = 179] + .. | |--leaf "Ford Pantera L" ( value.Ford Pantera L = 61 ) + .. | `--[dendrogram w/ 2 branches and 2 members at h = 10.1, midpoint = 0.5, value = 118] + .. | |--leaf "Camaro Z28" ( value.Camaro Z28 = 58.8 ) + .. | `--leaf "Duster 360" ( value.Duster 360 = 59.7 ) + .. `--[dendrogram w/ 2 branches and 23 members at h = 262, midpoint = 6.33, value = 716] + .. |--[dendrogram w/ 2 branches and 7 members at h = 103, midpoint = 2.06, value = 306] + .. | |--[dendrogram w/ 2 branches and 2 members at h = 33.6, midpoint = 0.5, value = 73.8] + .. | | |--leaf "Valiant" ( value.Valiant = 35.0 ) + .. | | `--leaf "Hornet 4 Drive" ( value.Hornet 4 Drive = 38.7 ) + .. | `--[dendrogram w/ 2 branches and 5 members at h = 51.8, midpoint = 1.62, value = 233] + .. | |--[dendrogram w/ 2 branches and 2 members at h = 14.0, midpoint = 0.5, value = 93.2] + .. | | |--leaf "AMC Javelin" ( value.AMC Javelin = 46 ) + .. | | `--leaf "Dodge Challenger" ( value.Dodge Challenger = 47.2 ) + .. | `--[dendrogram w/ 2 branches and 3 members at h = 2.14, midpoint = 0.75, value = 139] + .. | |--leaf "Merc 450SLC" ( value.Merc 450SLC = 46.4 ) + .. | `--[dendrogram w/ 2 branches and 2 members at h = 0.983, midpoint = 0.5, value = 93] + .. | |--leaf "Merc 450SE" ( value.Merc 450SE = 46.4 ) + .. | `--leaf "Merc 450SL" ( value.Merc 450SL = 46.5 ) + .. `--[dendrogram w/ 2 branches and 16 members at h = 142, midpoint = 3.59, value = 409] + .. |--[dendrogram w/ 2 branches and 4 members at h = 14.8, midpoint = 0.875, value = 75] + .. | |--leaf "Honda Civic" ( value.Honda Civic = 17.7 ) + .. | `--[dendrogram w/ 2 branches and 3 members at h = 10.4, midpoint = 0.75, value = 57.2] + .. | |--leaf "Toyota Corolla" ( value.Toyota Corolla = 18.8 ) + .. | `--[dendrogram w/ 2 branches and 2 members at h = 5.15, midpoint = 0.5, value = 38.4] + .. | |--leaf "Fiat X1-9" ( value.Fiat X1-9 = 18.9 ) + .. | `--leaf "Fiat 128" ( value.Fiat 128 = 19.4 ) + .. `--[dendrogram w/ 2 branches and 12 members at h = 113, midpoint = 2.30, value = 334] + .. |--leaf "Ferrari Dino" ( value.Ferrari Dino = 34.5 ) + .. `--[dendrogram w/ 2 branches and 11 members at h = 74.4, midpoint = 3.61, value = 300] + .. |--[dendrogram w/ 2 branches and 5 members at h = 64.9, midpoint = 1.25, value = 148] + .. | |--leaf "Merc 240D" ( value.Merc 240D = 24.6 ) + .. | `--[dendrogram w/ 2 branches and 4 members at h = 15.7, midpoint = 1.5, value = 124] + .. | |--[dendrogram w/ 2 branches and 2 members at h = 0.615, midpoint = 0.5, value = 59.9] + .. | | |--leaf "Mazda RX4" ( value.Mazda RX4 = 29.9 ) + .. | | `--leaf "Mazda RX4 Wag" ( value.Mazda RX4 Wag = 30 ) + .. | `--[dendrogram w/ 2 branches and 2 members at h = 1.52, midpoint = 0.5, value = 63.6] + .. | |--leaf "Merc 280C" ( value.Merc 280C = 31.8 ) + .. | `--leaf "Merc 280" ( value.Merc 280 = 31.9 ) + .. `--[dendrogram w/ 2 branches and 6 members at h = 50.1, midpoint = 0.969, value = 152] + .. |--leaf "Lotus Europa" ( value.Lotus Europa = 24.9 ) + .. `--[dendrogram w/ 2 branches and 5 members at h = 33.2, midpoint = 0.938, value = 127] + .. |--leaf "Merc 230" ( value.Merc 230 = 27.2 ) + .. `--[dendrogram w/ 2 branches and 4 members at h = 20.7, midpoint = 0.875, value = 99.5] + .. |--leaf "Volvo 142E" ( value.Volvo 142E = 26.3 ) + .. `--[dendrogram w/ 2 branches and 3 members at h = 13.1, midpoint = 0.75, value = 73.3] + .. |--leaf "Datsun 710" ( value.Datsun 710 = 23.6 ) + .. `--[dendrogram w/ 2 branches and 2 members at h = 8.65, midpoint = 0.5, value = 49.7] + .. |--leaf "Porsche 914-2" ( value.Porsche 914-2 = 24.8 ) + .. `--leaf "Toyota Corona" ( value.Toyota Corona = 24.9 ) + $ colDendrogram: ..--[dendrogram w/ 2 branches and 11 members at h = 1475, midpoint = 7, value = 436] + .. |--[dendrogram w/ 2 branches and 9 members at h = 116, midpoint = 4.5, value = 58.3] + .. | |--[dendrogram w/ 2 branches and 7 members at h = 34.8, midpoint = 1.5, value = 20.3] + .. | | |--leaf "cyl" ( value.cyl = 6.19 ) + .. | | `--[dendrogram w/ 2 branches and 6 members at h = 18.9, midpoint = 2, value = 14.2] + .. | | |--[dendrogram w/ 2 branches and 2 members at h = 3.61, midpoint = 0.5, value = 0.844] + .. | | | |--leaf "am" ( value.am = 0.406 ) + .. | | | `--leaf "vs" ( value.vs = 0.438 ) + .. | | `--[dendrogram w/ 2 branches and 4 members at h = 10.7, midpoint = 1.5, value = 13.3] + .. | | |--[dendrogram w/ 2 branches and 2 members at h = 8.6, midpoint = 0.5, value = 6.03] + .. | | | |--leaf "carb" ( value.carb = 2.81 ) + .. | | | `--leaf "wt" ( value.wt = 3.22 ) + .. | | `--[dendrogram w/ 2 branches and 2 members at h = 2.98, midpoint = 0.5, value = 7.28] + .. | | |--leaf "drat" ( value.drat = 3.6 ) + .. | | `--leaf "gear" ( value.gear = 3.69 ) + .. | `--[dendrogram w/ 2 branches and 2 members at h = 33.3, midpoint = 0.5, value = 37.9] + .. | |--leaf "qsec" ( value.qsec = 17.8 ) + .. | `--leaf "mpg" ( value.mpg = 20.1 ) + .. `--[dendrogram w/ 2 branches and 2 members at h = 657, midpoint = 0.5, value = 377] + .. |--leaf "hp" ( value.hp = 147 ) + .. `--leaf "disp" ( value.disp = 231 ) + $ breaks : num [1:257] -3.21 -3.19 -3.16 -3.14 -3.11 ... + $ col : chr [1:256] "#80FFFFFF" "#80FFFFFF" "#81FFFFFF" "#82FFFFFF" ... + $ vline : num 0 + $ colorTable :'data.frame': 256 obs. of 3 variables: + ..$ low : num [1:256] -3.21 -3.19 -3.16 -3.14 -3.11 ... + ..$ high : num [1:256] -3.19 -3.16 -3.14 -3.11 -3.09 ... + ..$ color: Factor w/ 254 levels "#80FFFFFF","#81FFFFFF",..: 1 1 2 3 4 5 6 7 8 9 ... > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2009-05-08 21:28:25
|
Revision: 1316 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1316&view=rev Author: warnes Date: 2009-05-08 21:27:55 +0000 (Fri, 08 May 2009) Log Message: ----------- Fix Rd syntax error Modified Paths: -------------- trunk/gplots/man/space.Rd Modified: trunk/gplots/man/space.Rd =================================================================== --- trunk/gplots/man/space.Rd 2009-04-22 17:15:11 UTC (rev 1315) +++ trunk/gplots/man/space.Rd 2009-05-08 21:27:55 UTC (rev 1316) @@ -64,7 +64,7 @@ \item{y}{y location of each input point} } \author{ Gregory R. Warnes \email{wa...@bs...} } -\seealso{ \code{\link{jitter}}, \code{link}[base]{sunflowerplot} } +\seealso{ \code{\link{jitter}}, \code{\link[base]{sunflowerplot}} } \examples{ x <- rep(1:5, 10) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2009-04-22 17:15:31
|
Revision: 1315 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1315&view=rev Author: warnes Date: 2009-04-22 17:15:11 +0000 (Wed, 22 Apr 2009) Log Message: ----------- VADeaths data set has move to dataset package Modified Paths: -------------- trunk/gplots/man/barplot2.Rd trunk/gplots/man/ooplot.Rd Modified: trunk/gplots/man/barplot2.Rd =================================================================== --- trunk/gplots/man/barplot2.Rd 2009-04-19 23:25:04 UTC (rev 1314) +++ trunk/gplots/man/barplot2.Rd 2009-04-22 17:15:11 UTC (rev 1315) @@ -237,7 +237,7 @@ barplot2(tN, space = 1.5, axisnames = FALSE, sub = "barplot2(..., space = 1.5, axisnames = FALSE)") -data(VADeaths, package = "base") +data(VADeaths, package = "datasets") barplot2(VADeaths, plot = FALSE) barplot2(VADeaths, plot = FALSE, beside = TRUE) Modified: trunk/gplots/man/ooplot.Rd =================================================================== --- trunk/gplots/man/ooplot.Rd 2009-04-19 23:25:04 UTC (rev 1314) +++ trunk/gplots/man/ooplot.Rd 2009-04-22 17:15:11 UTC (rev 1315) @@ -162,7 +162,7 @@ } \seealso{ \code{\link[plot]{plot}}, \code{\link[plot]{boxplot}} } \examples{ - data(VADeaths, package = "base") + data(VADeaths, package = "datasets") VADeaths <- cbind( Age=c(50,55,60,65,70), VADeaths) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ar...@us...> - 2009-04-19 23:25:17
|
Revision: 1314 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1314&view=rev Author: arnima Date: 2009-04-19 23:25:04 +0000 (Sun, 19 Apr 2009) Log Message: ----------- Changed object.size(object) to unclass(object.size(object)). Modified Paths: -------------- trunk/gdata/R/env.R trunk/gdata/R/ll.R Modified: trunk/gdata/R/env.R =================================================================== --- trunk/gdata/R/env.R 2009-02-16 15:34:40 UTC (rev 1313) +++ trunk/gdata/R/env.R 2009-04-19 23:25:04 UTC (rev 1314) @@ -3,7 +3,7 @@ get.object.size <- function(object.name, pos) { object <- get(object.name, pos=pos) - size <- try(object.size(object), silent=TRUE) + size <- try(unclass(object.size(object)), silent=TRUE) if(class(size) == "try-error") size <- 0 return(size) Modified: trunk/gdata/R/ll.R =================================================================== --- trunk/gdata/R/ll.R 2009-02-16 15:34:40 UTC (rev 1313) +++ trunk/gdata/R/ll.R 2009-04-19 23:25:04 UTC (rev 1314) @@ -23,7 +23,7 @@ get.object.size <- function(object.name, pos) { object <- get(object.name, pos=pos) - size <- try(object.size(object), silent=TRUE) + size <- try(unclass(object.size(object)), silent=TRUE) if(class(size) == "try-error") size <- 0 return(size) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2009-02-16 15:34:44
|
Revision: 1313 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1313&view=rev Author: warnes Date: 2009-02-16 15:34:40 +0000 (Mon, 16 Feb 2009) Log Message: ----------- Correct windows make flags as suggested by Brian Ripley. Modified Paths: -------------- trunk/gtools/src/Makevars.win Modified: trunk/gtools/src/Makevars.win =================================================================== --- trunk/gtools/src/Makevars.win 2008-12-31 13:30:45 UTC (rev 1312) +++ trunk/gtools/src/Makevars.win 2009-02-16 15:34:40 UTC (rev 1313) @@ -1 +1 @@ -DLLLIBS:=$(DLLLIBS) -lwsock32 +PKG_LIBS = -lws2_32 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gg...@us...> - 2008-12-31 13:30:54
|
Revision: 1312 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1312&view=rev Author: ggorjan Date: 2008-12-31 13:30:45 +0000 (Wed, 31 Dec 2008) Log Message: ----------- Documenting changes and exporting the functions. Modified Paths: -------------- trunk/gdata/NAMESPACE trunk/gdata/inst/NEWS Modified: trunk/gdata/NAMESPACE =================================================================== --- trunk/gdata/NAMESPACE 2008-12-31 13:30:07 UTC (rev 1311) +++ trunk/gdata/NAMESPACE 2008-12-31 13:30:45 UTC (rev 1312) @@ -2,6 +2,7 @@ export( Args, aggregate.table, + bindData, cbindX, combine, ConvertMedUnits, @@ -17,31 +18,35 @@ "lowerTriangle<-", matchcols, nobs, + nPairs, read.xls, rename.vars, remove.vars, reorder.factor, resample, trim, - trimSum, + trimSum, unmatrix, upperTriangle, "upperTriangle<-", + wideByFactor, write.fwf, xls2csv, + ## Object size stuff + object.size, as.object_size, is.object_size, humanReadable, + + ## getDateTime stuff + getYear, getMonth, getDay, getHour, getMin, getSec, + ## mapLevels stuff - mapLevels, - as.levelsMap, - as.listLevelsMap, - is.levelsMap, - is.listLevelsMap, - "mapLevels<-", + mapLevels, as.levelsMap, as.listLevelsMap, is.levelsMap, is.listLevelsMap, "mapLevels<-", ## unknown stuff - isUnknown, - unknownToNA, - NAToUnknown + isUnknown, unknownToNA, NAToUnknown, + + ## Unit testing + .runRUnitTestsGdata ) importFrom(stats, reorder) @@ -55,6 +60,28 @@ S3method(drop.levels, list) S3method(drop.levels, data.frame) +## getDateTime stuff +S3method(getYear, default) +S3method(getYear, Date) +S3method(getYear, POSIXct) +S3method(getYear, POSIXlt) + +S3method(getMonth, default) +S3method(getMonth, Date) +S3method(getMonth, POSIXct) +S3method(getMonth, POSIXlt) + +S3method(getDay, default) +S3method(getDay, Date) +S3method(getDay, POSIXct) +S3method(getDay, POSIXlt) + +S3method(getHour, default) + +S3method(getMin, default) + +S3method(getSec, default) + ## mapLevels stuff S3method(mapLevels, default) S3method(mapLevels, character) @@ -83,6 +110,10 @@ S3method(nobs, default) S3method(nobs, lm) +## Object size stuff +S3method(print, object_size) +S3method(c, object_size) + ## unknown stuff S3method(isUnknown, default) S3method(isUnknown, POSIXlt) Modified: trunk/gdata/inst/NEWS =================================================================== --- trunk/gdata/inst/NEWS 2008-12-31 13:30:07 UTC (rev 1311) +++ trunk/gdata/inst/NEWS 2008-12-31 13:30:45 UTC (rev 1312) @@ -1,12 +1,31 @@ -CHANGES IN 2.5.0 (2008-??-??) +CHANGES IN 2.5.0 (2009-??-??) ----------------------------- -- New function trimSum that sums trimmed values +- New function .runRUnitTestsGdata that enables run of all RUnit tests during + the R CMD check as well as directly from within R. +- Enhanced function object.size that returns the size of multiple objects. There + is also a handy print method that can print size of an object in "human readable" + format when options(humanReadable=TRUE) or print(x, humanReadable=TRUE). + +- New function bindData that binds two data frames into a multivariate data frame + in a different way than merge. + +- New function wideByFactor that reshapes given dataset by a given factor - + it creates a "multivariate" data.frame. + +- New functions getYear, getMonth, getDay, getHour, getMin, and getSec for + extracting the date/time parts from objects of a date/time class. + +- New function nPairs that gives the number of variable pairs in a data.frame + or a matrix. + +- New function trimSum that sums trimmed values. + - New function cbindX that can bind objects with different number of rows. -- write.fwf gains width argument. Unknown values can increase or decrease - the width of the columns. Additional tests and documentation fixes. +- write.fwf gains the width argument. The value for unknown can increase or + decrease the width of the columns. Additional tests and documentation fixes. CHANGES IN 2.4.2 (2008-05-11) ----------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gg...@us...> - 2008-12-31 13:30:10
|
Revision: 1311 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1311&view=rev Author: ggorjan Date: 2008-12-31 13:30:07 +0000 (Wed, 31 Dec 2008) Log Message: ----------- Enhanced function object.size that returns the size of multiple objects. There is also a handy print method that can print size of an object in "human readable" format when options(humanReadable=TRUE) or print(object.size(x), humanReadable=TRUE). Added Paths: ----------- trunk/gdata/R/object.size.R trunk/gdata/man/humanReadable.Rd trunk/gdata/man/object.size.Rd Added: trunk/gdata/R/object.size.R =================================================================== --- trunk/gdata/R/object.size.R (rev 0) +++ trunk/gdata/R/object.size.R 2008-12-31 13:30:07 UTC (rev 1311) @@ -0,0 +1,92 @@ +### object.size.R +###------------------------------------------------------------------------ +### What: Print object size in human readable format - code +### $Id$ +### Time-stamp: <2008-12-30 08:05:43 ggorjan> +###------------------------------------------------------------------------ + +object.size <- function(...) +{ + structure(sapply(list(...), function(x) .Internal(object.size(x))), + class=c("object_size", "numeric")) +} + +print.object_size <- function(x, quote=FALSE, humanReadable, ...) +{ + xOrig <- x + if(missing(humanReadable)) { + opt <- getOption("humanReadable") + humanReadable <- ifelse(!is.null(opt), opt, FALSE) + } + if(humanReadable) { + print(humanReadable(x), quote=quote, ...) + } else { + class(x) <- "numeric" + NextMethod() + } + invisible(xOrig) +} + +is.object_size <- function(x) inherits(x, what="object_size") + +as.object_size <- function(x) +{ + if(!is.numeric(x)) stop("'x' must be numeric/integer") + class(x) <- c("object_size", "numeric") + x +} + +c.object_size <- function(..., recursive=FALSE) +{ + x <- NextMethod() + if(is.numeric(x)) class(x) <- c("object_size", "numeric") + x +} + +humanReadable <- function(x, standard="SI", digits=1, width=3, sep=" ") +{ + ## --- Setup --- + + if(any(x < 0)) stop("'x' must be positive") + if(standard == "SI") { + suffix <- c("B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB") + base <- 1000 + } else { + suffix <- c("B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB") + base <- 1024 + } + + ## --- Apply --- + + .applyHuman <- function(x, base, suffix, digits, width, sep) + { + ## Which suffix should we use? + n <- length(suffix) + for(i in 1:n) { + if(x >= base) { + if(i < n) x <- x / base + } else { + break + } + } + ## Formatting + if(is.null(width)) { ## the same formatting for all + x <- format(round(x=x, digits=digits), nsmall=digits) + } else { ## similar to ls, du, and df + lenX <- nchar(x) + if(lenX > width) { + digitsMy <- width - (lenX - (lenX - (nchar(round(x)) + 1))) + digits <- ifelse(digitsMy > digits, digits, digitsMy) + } + if(i == 1) digits <- 0 + x <- round(x, digits=digits) + } + paste(x, suffix[i], sep=sep) + } + + sapply(X=x, FUN=".applyHuman", base=base, suffix=suffix, digits=digits, + width=width, sep=sep) +} + +###------------------------------------------------------------------------ +### object.size.R ends here Property changes on: trunk/gdata/R/object.size.R ___________________________________________________________________ Added: svn:keywords + Added: trunk/gdata/man/humanReadable.Rd =================================================================== --- trunk/gdata/man/humanReadable.Rd (rev 0) +++ trunk/gdata/man/humanReadable.Rd 2008-12-31 13:30:07 UTC (rev 1311) @@ -0,0 +1,131 @@ +% humanReadable.Rd +%-------------------------------------------------------------------------- +% What: Print byte size in human readable format man page +% $Id$ +% Time-stamp: <2008-12-30 13:26:35 ggorjan> +%-------------------------------------------------------------------------- + +\name{humanReadable} + +\alias{humanReadable} + +\title{Print byte size in human readable format} + +\description{ + +\code{humanReadable} converts byte size in human readable format such as +kB, MB, GB, etc. + +} + +\usage{ + +humanReadable(x, standard="SI", digits=1, width=3, sep=" ") + +} + +\arguments{ + \item{x}{integer, byte size} + \item{standard}{character, "SI" for powers of 1000 or anything else for + powers of 1024, see details} + \item{digits}{integer, number of digits after decimal point} + \item{width}{integer, width of number string} + \item{sep}{character, separator between number and unit} +} + +\details{ + +Basic unit used to store information in computers is a bit. Bits are +represented as zeroes and ones - binary number system. Although, the binary +number system is not the same as the decimal number system, decimal prefixes +for binary multiples such as kilo and mega are often used. In the decimal system +kilo represent 1000, which is close to \eqn{1024 = 2^{10}} in the binary system. +This sometimes causes problems as it is not clear which powers (2 or 10) are used +in a notation like 1 kB. To overcome this problem International Electrotechnical +Commission (IEC) has provided the following solution to this problem: + +\tabular{lrcll}{ +Name \tab System \tab Symbol \tab Size \tab Conversion \cr +byte \tab binary \tab B \tab \eqn{2^3} \tab 8 bits \cr +kilobyte \tab decimal \tab kB \tab \eqn{10^3} \tab 1000 bytes \cr +kibibyte \tab binary \tab KiB \tab \eqn{2^{10}} \tab 1024 bytes \cr +megabyte \tab decimal \tab MB \tab \eqn{(10^3)^2} \tab 1000 kilobytes\cr +mebibyte \tab binary \tab MiB \tab \eqn{(2^{10})^2} \tab 1024 kibibytes\cr +gigabyte \tab decimal \tab GB \tab \eqn{(10^3)^3} \tab 1000 megabytes\cr +gibibyte \tab binary \tab GiB \tab \eqn{(2^{10})^3} \tab 1024 mebibytes\cr +terabyte \tab decimal \tab TB \tab \eqn{(10^3)^4} \tab 1000 gigabytes\cr +tebibyte \tab binary \tab TiB \tab \eqn{(2^{10})^4} \tab 1024 gibibytes\cr +petabyte \tab decimal \tab PB \tab \eqn{(10^3)^5} \tab 1000 terabytes\cr +pebibyte \tab binary \tab PiB \tab \eqn{(2^{10})^5} \tab 1024 tebibytes\cr +exabyte \tab decimal \tab EB \tab \eqn{(10^3)^6} \tab 1000 petabytes\cr +exbibyte \tab binary \tab EiB \tab \eqn{(2^{10})^6} \tab 1024 pebibytes\cr +zettabyte \tab decimal \tab ZB \tab \eqn{(10^3)^7} \tab 1000 exabytes\cr +zebibyte \tab binary \tab ZiB \tab \eqn{(2^{10})^7} \tab 1024 exbibytes\cr +yottabyte \tab decimal \tab YB \tab \eqn{(10^3)^8} \tab 1000 zettabytes\cr +yebibyte \tab binary \tab YiB \tab \eqn{(2^{10})^8} \tab 1024 zebibytes\cr +} + +where Zi and Yi are GNU extensions to IEC. To get the output in the decimal +system (powers of 1000) use \code{standard="SI"}. Otherwise IEC standard +(powers of 1024) is used. + +For printout both \code{digits} and \code{width} can be specified. If +\code{width} is \code{NULL}, all values have given number of digits. If +\code{width} is not \code{NULL}, output is rounded to a given width and +formated similar to human readable format of \code{ls}, \code{df} or +\code{du} shell commands. + +} + +\references{ + +Wikipedia: +\url{http://en.wikipedia.org/wiki/Byte} +\url{http://en.wikipedia.org/wiki/SI_prefix} +\url{http://en.wikipedia.org/wiki/Binary_prefix} + +GNU manual for coreutils: +\url{http://www.gnu.org/software/coreutils/manual/html_node/Block-size.html#Block-size} + +} + +\value{ + +Byte size in human readable format as character with proper unit symbols +added at the end of the string. + +} + +\author{Ales Korosec and Gregor Gorjanc} + +\seealso{ + \code{\link{object.size}}, \code{\link[gdata]{ll}} +} + +\examples{ + +baseSI <- 10 +powerSI <- seq(from=3, to=27, by=3) +SI0 <- (baseSI)^powerSI +k <- length(SI0) - 1 +SI1 <- SI0 - SI0 / c(2, runif(n=k, min=1.01, max=5.99)) +SI2 <- SI0 + SI0 / c(2, runif(n=k, min=1.01, max=5.99)) + +baseIEC <- 2 +powerIEC <- seq(from=10, to=90, by=10) +IEC0 <- (baseIEC)^powerIEC +IEC1 <- IEC0 - IEC0 / c(2, runif(n=k, min=1.01, max=5.99)) +IEC2 <- IEC0 + IEC0 / c(2, runif(n=k, min=1.01, max=5.99)) + +cbind(humanReadable(x=SI1, width=NULL, digits=3), + humanReadable(x=SI0, width=NULL, digits=2), + humanReadable(x=SI2, width=NULL, digits=1), + humanReadable(x=IEC1, standard="IEC", width=7, digits=3), + humanReadable(x=IEC0, standard="IEC", width=7, digits=2), + humanReadable(x=IEC2, standard="IEC", width=7, digits=1)) +} + +\keyword{misc} + +%-------------------------------------------------------------------------- +% humanReadable.Rd ends here Added: trunk/gdata/man/object.size.Rd =================================================================== --- trunk/gdata/man/object.size.Rd (rev 0) +++ trunk/gdata/man/object.size.Rd 2008-12-31 13:30:07 UTC (rev 1311) @@ -0,0 +1,85 @@ +% File src/library/utils/man/object.size.Rd +% Part of the R package, http://www.R-project.org +% Copyright 1995-2007 R Core Development Team +% Distributed under GPL 2 or later + +\name{object.size} +\alias{object.size} +\alias{print.object_size} +\alias{c.object_size} +\alias{as.object_size} +\alias{is.object_size} + +\title{Report the Space Allocated for an Object} +\description{ + Provides an estimate of the memory that is being used to store an \R object. +} +\usage{ +object.size(\dots) + +\method{print}{object_size}(x, quote=FALSE, humanReadable, \dots) +} +\arguments{ + \item{\dots}{\code{object.size}: \R objects; \code{print}; arguments + to be passed to or from other methods.} + \item{x}{output from \code{object.size}} + \item{quote}{logical, indicating whether or not the result should be + printed with surrounding quotes.} + \item{humanReadable}{logical, use the \dQuote{human readable} format.} +} +\details{ + + This is a modified copy from the utils package in R as fo 2008-12-15. + + Exactly which parts of the memory allocation should be attributed to + which object is not clear-cut. This function merely provides a rough + indication: it should be reasonably accurate for atomic vectors, but + does not detect if elements of a list are shared, for example. + (Sharing amongst elements of a character vector is taken into account, + but not that between character vectors in a single object.) + + The calculation is of the size of the object, and excludes the space + needed to store its name in the symbol table. + + Associated space (e.g. the environment of a function and what the + pointer in a \code{EXTPTRSXP} points to) is not included in the + calculation. + + Object sizes are larger on 64-bit platforms than 32-bit ones, but will + very likely be the same on different platforms with the same word + length and pointer size. + + % Modificitaion start + Class of returned object is \code{c("byte", "numeric")} with + appropriate \code{print} and \code{c} methods. + + By default \code{object.size} outputs size in bytes, but human + readable format similar to \code{ls}, \code{df} or \code{du} shell + commands can be invoked with \code{options(humanReadable=TRUE)}. + % Modificitaion end + +} +\value{ + An object of class \code{"object.size"} with a length-one double value, + an estimate of the memory allocation attributable to the object in bytes. +} +\seealso{ + \code{\link{Memory-limits}} for the design limitations on object size. + \code{\link{humanReadable}} for human readable format. +} + +\examples{ +object.size(letters) +object.size(ls) +## find the 10 largest objects in the base package +z <- sapply(ls("package:base"), function(x) + object.size(get(x, envir = baseenv()))) +(tmp <- as.matrix(rev(sort(z))[1:10])) + +as.object_size(14567567) +options(humanReadable=TRUE) +(z <- object.size(letters, c(letters, letters), rep(letters, 100), rep(letters, 10000))) +is.object_size(z) +as.object_size(14567567) +} +\keyword{utilities} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gg...@us...> - 2008-12-31 13:29:09
|
Revision: 1310 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1310&view=rev Author: ggorjan Date: 2008-12-31 13:29:03 +0000 (Wed, 31 Dec 2008) Log Message: ----------- New function wideByFactor that reshapes given dataset by a given factor - it creates a "multivariate" data.frame. Added Paths: ----------- trunk/gdata/R/wideByFactor.R trunk/gdata/inst/unitTests/runit.wideByFactor.R trunk/gdata/man/wideByFactor.Rd Added: trunk/gdata/R/wideByFactor.R =================================================================== --- trunk/gdata/R/wideByFactor.R (rev 0) +++ trunk/gdata/R/wideByFactor.R 2008-12-31 13:29:03 UTC (rev 1310) @@ -0,0 +1,40 @@ +### wideByFactor.R +###------------------------------------------------------------------------ +### What: Reshape by factor levels - code +### $Id$ +### Time-stamp: <2008-12-30 22:17:32 ggorjan> +###------------------------------------------------------------------------ + +wideByFactor <- function(x, factor, common, sort=TRUE, keepFactor=TRUE) +{ + ## --- Setup --- + if(!is.data.frame(x)) stop("'x' must be a data frame") + if(length(factor) != 1) stop("'factor' can be only of length one") + if(!is.factor(x[[factor]])) stop("column defined in 'factor' must be a factor") + if(sort) x <- x[order(x[[factor]]), ] + + ## --- Extend by factors levels --- + y <- x[common] + if(keepFactor) y[factor] <- x[factor] + levs <- levels(x[[factor]]) + + ## Remove common and factor from the list of column names + other <- names(x) + other <- other[!(other %in% common) & !(other %in% factor)] + + ## Add all other columns but as a set for each level of a factor + for(level in levs) { + for(col in other) { + ## add a column col + y[paste(col, level, sep=".")] <- x[col] + ## fill with NA for other levels than level + y[x[factor] != level, paste(col, level, sep=".")] <- NA + ## This filling migth be inefficient if there is large number + ## of levels, since there will be quite a lot of filling. + } + } + y +} + +###------------------------------------------------------------------------ +### wideByFactor.R ends here \ No newline at end of file Property changes on: trunk/gdata/R/wideByFactor.R ___________________________________________________________________ Added: svn:keywords + Added: trunk/gdata/inst/unitTests/runit.wideByFactor.R =================================================================== --- trunk/gdata/inst/unitTests/runit.wideByFactor.R (rev 0) +++ trunk/gdata/inst/unitTests/runit.wideByFactor.R 2008-12-31 13:29:03 UTC (rev 1310) @@ -0,0 +1,55 @@ +### runit.wideByFactor.R +###------------------------------------------------------------------------ +### What: Reshape by factor levels - unit tests +### $Id$ +### Time-stamp: <2008-12-30 11:58:50 ggorjan> +###------------------------------------------------------------------------ + +### {{{ --- Test setup --- + +if(FALSE) { + library("RUnit") + library("gdata") +} + +### }}} +### {{{ --- wideByFactor --- + +test.wideByFactor <- function() +{ + n <- 10 + f <- 2 + tmp <- data.frame(y1=(1:n)/2, + y2=(n:1)*2, + f1=factor(rep(letters[1:f], n/2)), + f2=factor(c(rep(c("M"), n/2), rep(c("F"), n/2))), + c1=1:n, + c2=2*(1:n)) + + ## 'x' must be a data.frame + checkException(wideByFactor(x=1:10)) + checkException(wideByFactor(x=matrix(1:10))) + ## 'factor' can be only of length one + checkException(wideByFactor(x=tmp, factor=c("f1", "f2"))) + ## column defined in 'factor' must be a factor + checkException(wideByFactor(x=tmp, factor="c1")) + + tmp2 <- wideByFactor(x=tmp, factor="f1", common=c("c1", "c2"), sort=FALSE) + checkEquals(tmp2[c("c1", "c2")], tmp[c("c1", "c2")]) + checkEquals(names(tmp2), c("c1", "c2", "f1", "y1.a", "y2.a", "f2.a", "y1.b", "y2.b", "f2.b")) + checkEquals(tmp2$y1.a, c(0.5, NA, 1.5, NA, 2.5, NA, 3.5, NA, 4.5, NA)) + checkEquals(tmp2$f2.a, factor(c("M", NA, "M", NA, "M", NA, "F", NA, "F", NA))) + tmp2 <- wideByFactor(x=tmp, factor="f1", common=c("c1", "c2"), sort=TRUE, keepFactor=FALSE) + checkEquals(tmp2$f2.a, factor(c("M", "M", "M", "F", "F", NA, NA, NA, NA, NA))) + checkEquals(names(tmp2), c("c1", "c2", "y1.a", "y2.a", "f2.a", "y1.b", "y2.b", "f2.b")) +} + +### }}} +### {{{ Dear Emacs +## Local variables: +## folded-file: t +## End: +### }}} + +###------------------------------------------------------------------------ +### runit.wideByFactor.R ends here Property changes on: trunk/gdata/inst/unitTests/runit.wideByFactor.R ___________________________________________________________________ Added: svn:keywords + Added: trunk/gdata/man/wideByFactor.Rd =================================================================== --- trunk/gdata/man/wideByFactor.Rd (rev 0) +++ trunk/gdata/man/wideByFactor.Rd 2008-12-31 13:29:03 UTC (rev 1310) @@ -0,0 +1,73 @@ +% wideByFactor.Rd +%-------------------------------------------------------------------------- +% What: Reshape by factor levels - help +% $Id$ +% Time-stamp: <2008-12-30 13:49:50 ggorjan> +%-------------------------------------------------------------------------- + +\name{wideByFactor} +\alias{wideByFactor} + +\title{Create multivariate data by a given factor} + +\description{ + +\code{wideByFactor} modifies data.frame in such a way that variables are +\dQuote{separated} into several columns by factor levels. + +} + +\usage{ + wideByFactor(x, factor, common, sort=TRUE, keepFactor=TRUE) +} + +\arguments{ + \item{x}{data frame} + \item{factor}{character, column name of a factor by which variables will + be divided} + \item{common}{character, column names of (common) columns that should not + be divided} + \item{sort}{logical, sort resulting data frame by factor levels} + \item{keepFactor}{logical, keep the \sQuote{factor} column} +} + +\details{ + +Given data frame is modified in such a way, that output represents a data frame +with \eqn{c + f + n * v} columns, where \eqn{c} is a number of common columns +for all levels of a factor, \eqn{f} is a factor column, \eqn{n} is a number of +levels in factor \eqn{f} and \eqn{v} is a number of variables that should be +divided for each level of a factor. Number of rows stays the same! +} + +\value{ + A data frame where divided variables have sort of \dQuote{diagonalized} structure +} + +\author{Gregor Gorjanc} + +\seealso{ + \code{\link[stats]{reshape}} in the \pkg{stats} package, + \code{\link[reshape]{melt}} and \code{\link[reshape]{cast}} in + the \pkg{reshape} package +} + +\examples{ +n <- 10 +f <- 2 +tmp <- data.frame(y1=rnorm(n=n), + y2=rnorm(n=n), + f1=factor(rep(letters[1:f], n/2)), + f2=factor(c(rep(c("M"), n/2), rep(c("F"), n/2))), + c1=1:n, + c2=2*(1:n)) + +wideByFactor(x=tmp, factor="f1", common=c("c1", "c2", "f2")) +wideByFactor(x=tmp, factor="f1", common=c("c1", "c2")) +} + +\keyword{manip} +\keyword{misc} + +%-------------------------------------------------------------------------- +% wideByFactor.Rd ends here \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gg...@us...> - 2008-12-31 13:28:05
|
Revision: 1309 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1309&view=rev Author: ggorjan Date: 2008-12-31 13:28:02 +0000 (Wed, 31 Dec 2008) Log Message: ----------- New function nPairs that gives the number of variable pairs in a data.frame or a matrix. Added Paths: ----------- trunk/gdata/R/nPairs.R trunk/gdata/inst/unitTests/runit.nPairs.R trunk/gdata/man/nPairs.Rd Added: trunk/gdata/R/nPairs.R =================================================================== --- trunk/gdata/R/nPairs.R (rev 0) +++ trunk/gdata/R/nPairs.R 2008-12-31 13:28:02 UTC (rev 1309) @@ -0,0 +1,49 @@ +### nPairs.R +###------------------------------------------------------------------------ +### What: Number of variable pairs - code +### $Id$ +### Time-stamp: <2008-12-30 18:29:58 ggorjan> +###------------------------------------------------------------------------ + +nPairs <- function(x, margin=FALSE, names=TRUE, abbrev=TRUE, ...) +{ + ## --- Setup --- + if(!is.data.frame(x) & !is.matrix(x)) stop("'x' must be a data.frame or a matrix") + k <- ncol(x) + if(!margin) { + ret <- matrix(nrow=k, ncol=k) + } else { + ret <- matrix(nrow=k, ncol=k + 1) + } + + ## --- Count --- + diag(ret)[1:k] <- apply(X=x, MARGIN=2, FUN=function(x) sum(!is.na(x))) + for(i in 1:k) { + for(j in i:k) { + ret[i, j] <- ret[j, i] <- sum(!is.na(x[, i]) & !is.na(x[, j])) + if(margin) { + if(i == 1) { + ret[i, (k + 1)] <- ret[1, 1] + } else { + ret[i, (k + 1)] <- sum(rowSums(!is.na(x[, c(1:i)])) == i) + } + } + } + } + + ## --- Names --- + if(names) { + tmp <- colnames(x) + if(abbrev) tmp <- as.character(abbreviate(tmp, ...)) + rownames(ret) <- tmp + if(margin) { + colnames(ret) <- c(tmp, "all") + } else { + colnames(ret) <- tmp + } + } + ret +} + +###------------------------------------------------------------------------ +### nPairs.R ends here Property changes on: trunk/gdata/R/nPairs.R ___________________________________________________________________ Added: svn:keywords + Added: trunk/gdata/inst/unitTests/runit.nPairs.R =================================================================== --- trunk/gdata/inst/unitTests/runit.nPairs.R (rev 0) +++ trunk/gdata/inst/unitTests/runit.nPairs.R 2008-12-31 13:28:02 UTC (rev 1309) @@ -0,0 +1,56 @@ +### runit.nPairs.R +###------------------------------------------------------------------------ +### What: Number of variable pairs - unit tests +### $Id$ +### Time-stamp: <2008-12-30 18:24:59 ggorjan> +###------------------------------------------------------------------------ + +### {{{ --- Test setup --- + +if(FALSE) { + library("RUnit") + library("gdata") +} + +### }}} +### {{{ --- nPairs --- + +test.nPairs <- function() +{ + ## 'x' must be a data.frame or a matrix + x <- rpois(100, lambda=10) + checkException(nPairs(x=x)) + checkException(nPairs(x=table(x))) + + test <- data.frame(V1=c(1, 2, 3, 4, 5), + V2=c(NA, 2, 3, 4, 5), + V3=c(1, NA, NA, NA, NA), + V4=c(1, 2, 3, NA, NA)) + testCheck <- matrix(as.integer(c(5, 4, 1, 3, + 4, 4, 0, 2, + 1, 0, 1, 1, + 3, 2, 1, 3)), + nrow=4, ncol=4, byrow=TRUE) + + testCheckNames <- testCheck + colnames(testCheckNames) <- rownames(testCheckNames) <- colnames(test) + + checkIdentical(nPairs(x=test), testCheckNames) + checkIdentical(nPairs(x=test, names=FALSE), testCheck) + checkIdentical(nPairs(x=as.matrix(test)), testCheckNames) + checkIdentical(nPairs(x=as.matrix(test), names=FALSE), testCheck) + + testCheck <- cbind(testCheckNames, as.integer(c(5, 4, 0, 0))) + colnames(testCheck) <- c(colnames(test), "all") + checkIdentical(nPairs(x=test, margin=TRUE), testCheck) +} + +### }}} +### {{{ Dear Emacs +### Local variables: +### folded-file: t +### end: +### }}} + +###------------------------------------------------------------------------ +### runit.nPairs.R ends here Property changes on: trunk/gdata/inst/unitTests/runit.nPairs.R ___________________________________________________________________ Added: svn:keywords + Added: trunk/gdata/man/nPairs.Rd =================================================================== --- trunk/gdata/man/nPairs.Rd (rev 0) +++ trunk/gdata/man/nPairs.Rd 2008-12-31 13:28:02 UTC (rev 1309) @@ -0,0 +1,73 @@ +% nPairs.Rd +%-------------------------------------------------------------------------- +% What: Number of variable pairs - help +% $Id$ +% Time-stamp: <2008-12-30 18:30:11 ggorjan> +%-------------------------------------------------------------------------- + +\name{nPairs} + +\alias{nPairs} + +\concept{pairs} + +\title{Number of variable pairs} + +\description{ + +\code{nPairs} counts the number of pairs between variables. + +} + +\usage{ +nPairs(x, margin=FALSE, names=TRUE, abbrev=TRUE, ...) +} + +\arguments{ + \item{x}{data.frame or a matrix} + \item{margin}{logical, calculate the cumulative number of \dQuote{pairs}} + \item{names}{logical, add row/col-names to the output} + \item{abbrev}{logical, abbreviate names} + \item{\ldots}{other arguments passed to \code{\link{abbreviate}}} +} + +\value{ + +Matrix of order \eqn{k}, where \eqn{k} is the number of columns in \code{x}. +Values in a matrix represent the number of pairs between columns/variables in +\code{x}. If \code{margin=TRUE}, the number of columns is \eqn{k+1} and the +last column represents the cumulative number of pairing all variables. + +} + +\author{Gregor Gorjanc} + +\seealso{\code{\link{abbreviate}}} + +\examples{ + +## Test data +test <- data.frame(V1=c(1, 2, 3, 4, 5), + V2=c(NA, 2, 3, 4, 5), + V3=c(1, NA, NA, NA, NA), + V4=c(1, 2, 3, NA, NA)) + +## Number of variable pairs +nPairs(x=test) + +## Without names +nPairs(x=test, names=FALSE) + +## Longer names +colnames(test) <- c("Variable1", "Variable2", "Variable3", "Variable4") +nPairs(x=test) + +## Margin +nPairs(x=test, margin=TRUE) + +} + +\keyword{misc} + +%-------------------------------------------------------------------------- +% nPairs.Rd ends here This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gg...@us...> - 2008-12-31 13:27:01
|
Revision: 1308 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1308&view=rev Author: ggorjan Date: 2008-12-31 13:26:51 +0000 (Wed, 31 Dec 2008) Log Message: ----------- New functions getYear, getMonth, getDay, getHour, getMin, and getSec for extracting the date/time parts from objects of a date/time class. Added Paths: ----------- trunk/gdata/R/getDateTimeParts.R trunk/gdata/inst/unitTests/runit.getDateTimeParts.R trunk/gdata/man/getDateTimePart.Rd Added: trunk/gdata/R/getDateTimeParts.R =================================================================== --- trunk/gdata/R/getDateTimeParts.R (rev 0) +++ trunk/gdata/R/getDateTimeParts.R 2008-12-31 13:26:51 UTC (rev 1308) @@ -0,0 +1,90 @@ +### getDateTimePart.R +###------------------------------------------------------------------------ +### What: Extract date and time parts from various date and time classes +### $Id$ +### Time-stamp: <2008-12-30 22:42:58 ggorjan> +###------------------------------------------------------------------------ + +### {{{ getYear +###------------------------------------------------------------------------ + +getYear <- function(x, format, ...) + UseMethod("getYear") + +getYear.default <- function(x, format, ...) + stop("'getYear' can only be used on objects of a date/time class") + +getYear.Date <- +getYear.POSIXct <- +getYear.POSIXlt <- function(x, format="%Y", ...) + format(x=x, format=format, ...) + +### }}} +### {{{ getMonth +###------------------------------------------------------------------------ + +getMonth <- function(x, format, ...) + UseMethod("getMonth") + +getMonth.default <- function(x, format, ...) + stop("'getMonth' can only be used on objects of a date/time class") + +getMonth.Date <- +getMonth.POSIXct <- +getMonth.POSIXlt <- function(x, format="%m", ...) + format(x=x, format=format) + +### }}} +### {{{ getDay +###------------------------------------------------------------------------ + +getDay <- function(x, format, ...) + UseMethod("getDay") + +getDay.default <- function(x, format, ...) + stop("'getDay' can only be used on objects of a date/time class") + +getDay.Date <- +getDay.POSIXct <- +getDay.POSIXlt <- function(x, format="%d", ...) + format(x=x, format=format) + +### }}} +### {{{ getHour +###------------------------------------------------------------------------ + +getHour <- function(x, format, ...) + UseMethod("getHour") + +getHour.default <- function(x, format, ...) + stop("'getHour' can only be used on objects of a date/time class") + +### }}} +### {{{ getMin +###------------------------------------------------------------------------ + +getMin <- function(x, format, ...) + UseMethod("getMin") + +getMin.default <- function(x, format, ...) + stop("'getMin' can only be used on objects of a date/time class") + +### }}} +### {{{ getSec +###------------------------------------------------------------------------ + +getSec <- function(x, format, ...) + UseMethod("getSec") + +getSec.default <- function(x, format, ...) + stop("'getSec' can only be used on objects of a date/time class") + +### }}} +### {{{ Dear Emacs +## Local variables: +## folded-file: t +## End: +### }}} + +###------------------------------------------------------------------------ +### getDateTimePart.R ends here \ No newline at end of file Property changes on: trunk/gdata/R/getDateTimeParts.R ___________________________________________________________________ Added: svn:keywords + Added: trunk/gdata/inst/unitTests/runit.getDateTimeParts.R =================================================================== --- trunk/gdata/inst/unitTests/runit.getDateTimeParts.R (rev 0) +++ trunk/gdata/inst/unitTests/runit.getDateTimeParts.R 2008-12-31 13:26:51 UTC (rev 1308) @@ -0,0 +1,121 @@ +### runit.getDateTimeParts.R +###------------------------------------------------------------------------ +### What: Extract date and time parts from ... - unit tests +### $Id$ +### Time-stamp: <2008-12-30 22:41:18 ggorjan> +###------------------------------------------------------------------------ + +### {{{ --- Test setup --- + +if(FALSE) { + library("RUnit") + library("gdata") +} + +num <- 1 +cha <- "a" +fac <- factor(c("A")) + +tYear <- as.character(c(2006, 1995, 1005, 3067)) +tMonth <- c("01", "04", "06", "12") +tDay <- c("01", "12", "22", "04") +tDate <- paste(tYear, tMonth, tDay, sep="-") + +tHour <- c("05", "16", "20", "03") +tMin <- c("16", "40", "06", "52") +tSec <- c("56", "34", "05", "15") +tTime <- paste(tHour, tMin, tSec, sep=":") + +# tDateTime <- paste() + +cDate <- as.Date(tDate) +cDatePOSIXct <- as.POSIXct(cDate) +cDatePOSIXlt <- as.POSIXlt(cDate) + +### }}} +### {{{ --- getYear --- + +test.getYear <- function() +{ + checkException(getYear(x=num)) + checkException(getYear(x=cha)) + checkException(getYear(x=fac)) + + checkIdentical(getYear(x=cDate), tYear) + checkIdentical(getYear(x=cDatePOSIXct), tYear) + checkIdentical(getYear(x=cDatePOSIXlt), tYear) +} + +### }}} +### {{{ --- getMonth --- + +test.getMonth <- function() +{ + checkException(getMonth(x=num)) + checkException(getMonth(x=cha)) + checkException(getMonth(x=fac)) + + checkIdentical(getMonth(x=cDate), tMonth) + checkIdentical(getMonth(x=cDatePOSIXct), tMonth) + checkIdentical(getMonth(x=cDatePOSIXlt), tMonth) +} + +### }}} +### {{{ --- getDay --- + +test.getDay <- function() +{ + checkException(getDay(x=num)) + checkException(getDay(x=cha)) + checkException(getDay(x=fac)) + + checkIdentical(getDay(x=cDate), tDay) + checkIdentical(getDay(x=cDatePOSIXct), tDay) + checkIdentical(getDay(x=cDatePOSIXlt), tDay) +} + +### }}} +### {{{ --- getHour --- + +test.getHour <- function() +{ + checkException(getHour(x=num)) + checkException(getHour(x=cha)) + checkException(getHour(x=fac)) + +## checkIdentical(getHour(x=cDate), tHour) +} + +### }}} +### {{{ --- getMin --- + +test.getMin <- function() +{ + checkException(getMin(x=num)) + checkException(getMin(x=cha)) + checkException(getMin(x=fac)) + +## checkIdentical(getMin(x=cDate), tMin) +} + +### }}} +### {{{ --- getSec --- + +test.getSec <- function() +{ + checkException(getSec(x=num)) + checkException(getSec(x=cha)) + checkException(getSec(x=fac)) + +## checkIdentical(getSec(x=cDate), tSec) +} + +### }}} +### {{{ Dear Emacs +### Local variables: +### folded-file: t +### end: +### }}} + +###------------------------------------------------------------------------ +### runit.getDateTimeParts.R ends here Property changes on: trunk/gdata/inst/unitTests/runit.getDateTimeParts.R ___________________________________________________________________ Added: svn:keywords + Added: trunk/gdata/man/getDateTimePart.Rd =================================================================== --- trunk/gdata/man/getDateTimePart.Rd (rev 0) +++ trunk/gdata/man/getDateTimePart.Rd 2008-12-31 13:26:51 UTC (rev 1308) @@ -0,0 +1,106 @@ +% getDateTimeParts.Rd +%-------------------------------------------------------------------------- +% What: Extract date and time parts from ... - help +% $Id$ +% Time-stamp: <2008-12-30 22:44:20 ggorjan> +%-------------------------------------------------------------------------- + +\name{getYear} + +\alias{getDateTimeParts} +\alias{getYear} +\alias{getYear.default} +\alias{getYear.Date} +\alias{getYear.POSIXct} +\alias{getYear.POSIXlt} + +\alias{getMonth} +\alias{getMonth.default} +\alias{getMonth.Date} +\alias{getMonth.POSIXct} +\alias{getMonth.POSIXlt} + +\alias{getDay} +\alias{getDay.default} +\alias{getDay.Date} +\alias{getDay.POSIXct} +\alias{getDay.POSIXlt} + +\alias{getHour} +\alias{getHour.default} + +\alias{getMin} +\alias{getMin.default} + +\alias{getSec} +\alias{getSec.default} + +\title{Get date/time parts from date and time objects} + +\description{get* functions provide an *experimental* approach for + extracting the date/time parts from objects of a date/time class. + They are designed to be intiutive and thus lowering the learning + curve for work with date and time classes in \R{}.} + +\usage{ + +getYear(x, format, \ldots) +getMonth(x, format, \ldots) +getDay(x, format, \ldots) +getHour(x, format, \ldots) +getMin(x, format, \ldots) +getSec(x, format, \ldots) + +} + + +\arguments{ + \item{x}{generic, date/time object} + \item{format}{character, format} + \item{\ldots}{arguments pased to other methods} +} + +\value{Character} + +\author{Gregor Gorjanc} + +\seealso{ + \code{\link{Date}}, + \code{\link{DateTimeClasses}}, + \code{\link{strptime}} +} + +\examples{ + +## --- Date class --- + +tmp <- Sys.Date() +tmp + +getYear(tmp) +getMonth(tmp) +getDay(tmp) + +## --- POSIXct class --- + +tmp <- as.POSIXct(tmp) + +getYear(tmp) +getMonth(tmp) +getDay(tmp) + +## --- POSIXlt class --- + +tmp <- as.POSIXlt(tmp) + +getYear(tmp) +getMonth(tmp) +getDay(tmp) + +} + +\keyword{manip} +\keyword{misc} + +%-------------------------------------------------------------------------- +% getDateTimeParts.Rd ends here \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gg...@us...> - 2008-12-31 13:26:03
|
Revision: 1307 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1307&view=rev Author: ggorjan Date: 2008-12-31 13:25:52 +0000 (Wed, 31 Dec 2008) Log Message: ----------- New function bindData that binds two data frames into a multivariate data frame in a different way than merge. Added Paths: ----------- trunk/gdata/R/bindData.R trunk/gdata/inst/unitTests/runit.bindData.R trunk/gdata/man/bindData.Rd Added: trunk/gdata/R/bindData.R =================================================================== --- trunk/gdata/R/bindData.R (rev 0) +++ trunk/gdata/R/bindData.R 2008-12-31 13:25:52 UTC (rev 1307) @@ -0,0 +1,38 @@ +### bindData.R +###------------------------------------------------------------------------ +### What: Bind two data frames - code +### $Id$ +### Time-stamp: <2008-12-30 22:01:00 ggorjan> +###------------------------------------------------------------------------ + +bindData <- function(x, y, common) +{ + ## --- Setup --- + if(!is.data.frame(x)) stop("'x' must be a data frame") + if(!is.data.frame(y)) stop("'y' must be a data frame") + + ## --- New data frame --- + + ## First add common column and a dataset indicator column + z <- rbind(x[common], y[common]) + + ## Other columns + ## - remove common columns in x and y + namesz <- names(z) + otherx <- names(x) + otherx <- otherx[!(otherx %in% namesz)] + othery <- names(y) + othery <- othery[!(othery %in% namesz)] + + ## - add all other columns but as a set for each input data frame + rx <- nrow(x); cx <- length(otherx) + ry <- nrow(y); cy <- length(othery) + + z <- cbind(z, rbind(x[otherx], matrix(rep(NA, times=(ry * cx)), nrow=ry, ncol=cx, dimnames=list(NULL, otherx)))) + z <- cbind(z, rbind(matrix(rep(NA, times=(rx * cy)), nrow=rx, ncol=cy, dimnames=list(NULL, othery)), y[othery])) + + z +} + +###------------------------------------------------------------------------ +### bindData.R ends here Property changes on: trunk/gdata/R/bindData.R ___________________________________________________________________ Added: svn:keywords + Added: trunk/gdata/inst/unitTests/runit.bindData.R =================================================================== --- trunk/gdata/inst/unitTests/runit.bindData.R (rev 0) +++ trunk/gdata/inst/unitTests/runit.bindData.R 2008-12-31 13:25:52 UTC (rev 1307) @@ -0,0 +1,75 @@ +### runit.bindData.R +###------------------------------------------------------------------------ +### What: Bind two data frames - unit tests +### $Id$ +### Time-stamp: <2008-12-30 11:58:50 ggorjan> +###------------------------------------------------------------------------ + +### {{{ --- Test setup --- + +if(FALSE) { + library("RUnit") + library("gdata") +} + +### }}} +### {{{ --- bindData --- + +test.bindData <- function() +{ + ## 'x'/'y' must be a data.frame + checkException(bindData(x=1:10, y=1:10)) + checkException(bindData(x=matrix(1:10), y=matrix(1:10))) + + n1 <- 6; n2 <- 12; n3 <- 4 + ## Single trait 1 + num <- c(5:n1, 10:13) + tmp1 <- data.frame(y1=rnorm(n=n1), + f1=factor(rep(c("A", "B"), n1/2)), + ch=letters[num], + fa=factor(letters[num]), + nu=(num) + 0.5, + id=factor(num), stringsAsFactors=FALSE) + + ## Single trait 2 with repeated records, some subjects also in tmp1 + num <- 4:9 + tmp2 <- data.frame(y2=rnorm(n=n2), + f2=factor(rep(c("C", "D"), n2/2)), + ch=letters[rep(num, times=2)], + fa=factor(letters[rep(c(num), times=2)]), + nu=c((num) + 0.5, (num) + 0.25), + id=factor(rep(num, times=2)), stringsAsFactors=FALSE) + + ## Single trait 3 with completely distinct set of subjects + num <- 1:4 + tmp3 <- data.frame(y3=rnorm(n=n3), + f3=factor(rep(c("E", "F"), n3/2)), + ch=letters[num], + fa=factor(letters[num]), + nu=(num) + 0.5, + id=factor(num), stringsAsFactors=FALSE) + + ## Combine all datasets + tmp12 <- bindData(x=tmp1, y=tmp2, common=c("id", "nu", "ch", "fa")) + tmp123 <- bindData(x=tmp12, y=tmp3, common=c("id", "nu", "ch", "fa")) + + checkEquals(names(tmp123), c("id", "nu", "ch", "fa", "y1", "f1", "y2", "f2", "y3", "f3")) + checkEquals(rbind(tmp1["id"], tmp2["id"], tmp3["id"]), tmp123["id"]) + checkEquals(rbind(tmp1["fa"], tmp2["fa"], tmp3["fa"]), tmp123["fa"]) + checkEquals(is.na(tmp123$y1), c(rep(FALSE, times=n1), rep(TRUE, times=n2+n3))) + checkEquals(is.na(tmp123$f1), c(rep(FALSE, times=n1), rep(TRUE, times=n2+n3))) + checkEquals(is.na(tmp123$y2), c(rep(TRUE, times=n1), rep(FALSE, times=n2), rep(TRUE, times=n3))) + checkEquals(is.na(tmp123$f2), c(rep(TRUE, times=n1), rep(FALSE, times=n2), rep(TRUE, times=n3))) + checkEquals(is.na(tmp123$y3), c(rep(TRUE, times=n1+n2), rep(FALSE, times=n3))) + checkEquals(is.na(tmp123$f3), c(rep(TRUE, times=n1+n2), rep(FALSE, times=n3))) +} + +### }}} +### {{{ Dear Emacs +## Local variables: +## folded-file: t +## End: +### }}} + +###------------------------------------------------------------------------ +### runit.bindData.R ends here Property changes on: trunk/gdata/inst/unitTests/runit.bindData.R ___________________________________________________________________ Added: svn:keywords + Added: trunk/gdata/man/bindData.Rd =================================================================== --- trunk/gdata/man/bindData.Rd (rev 0) +++ trunk/gdata/man/bindData.Rd 2008-12-31 13:25:52 UTC (rev 1307) @@ -0,0 +1,93 @@ +% bindData.Rd +%-------------------------------------------------------------------------- +% What: Bind two data frames - help +% $Id$ +% Time-stamp: <2008-12-30 13:49:50 ggorjan> +%-------------------------------------------------------------------------- + +\name{bindData} +\alias{bindData} + +\title{Bind two data frames into a multivariate data frame} + +\description{ + Usually data frames represent one set of variables and one needs to + bind/join them for multivariate analysis. When \code{\link{merge}} is not + the approriate solution, \code{bindData} might perform an appropriate binding + for two data frames. This is especially usefull when some variables are + measured once, while others are repeated. +} + +\usage{ + bindData(x, y, common) +} + +\arguments{ + \item{x}{data.frame} + \item{y}{data.frame} + \item{common}{character, list of column names that are common to both + input data frames} +} + +\details{ + Data frames are joined in a such a way, that the new data frame has + \eqn{c + (n_1 - c) + (n_2 - c)} columns, where \eqn{c} is the number of + common columns, and \eqn{n_1} and \eqn{n_2} are the number of columns + in the first and in the second data frame, respectively. +} + +\value{ + A data frame. +} + +\author{Gregor Grojanc} + +\seealso{ + \code{\link[base]{merge}}, + \code{\link{wideByFactor}} +} + +\examples{ +n1 <- 6 +n2 <- 12 +n3 <- 4 +## Single trait 1 +num <- c(5:n1, 10:13) +(tmp1 <- data.frame(y1=rnorm(n=n1), + f1=factor(rep(c("A", "B"), n1/2)), + ch=letters[num], + fa=factor(letters[num]), + nu=(num) + 0.5, + id=factor(num), stringsAsFactors=FALSE)) + +## Single trait 2 with repeated records, some subjects also in tmp1 +num <- 4:9 +(tmp2 <- data.frame(y2=rnorm(n=n2), + f2=factor(rep(c("C", "D"), n2/2)), + ch=letters[rep(num, times=2)], + fa=factor(letters[rep(c(num), times=2)]), + nu=c((num) + 0.5, (num) + 0.25), + id=factor(rep(num, times=2)), stringsAsFactors=FALSE)) + +## Single trait 3 with completely distinct set of subjects +num <- 1:4 +(tmp3 <- data.frame(y3=rnorm(n=n3), + f3=factor(rep(c("E", "F"), n3/2)), + ch=letters[num], + fa=factor(letters[num]), + nu=(num) + 0.5, + id=factor(num), stringsAsFactors=FALSE)) + +## Combine all datasets +(tmp12 <- bindData(x=tmp1, y=tmp2, common=c("id", "nu", "ch", "fa"))) +(tmp123 <- bindData(x=tmp12, y=tmp3, common=c("id", "nu", "ch", "fa"))) + +## Sort by subject +tmp123[order(tmp123$ch), ] +} + +\keyword{manip} +\keyword{misc} + +%-------------------------------------------------------------------------- +% bindData.Rd ends here \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gg...@us...> - 2008-12-31 13:24:53
|
Revision: 1306 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1306&view=rev Author: ggorjan Date: 2008-12-31 13:24:42 +0000 (Wed, 31 Dec 2008) Log Message: ----------- New function .runRUnitTestsGdata that enables run of all RUnit tests during the R CMD check as well as directly from within R. Modified Paths: -------------- trunk/gdata/inst/unitTests/Makefile trunk/gdata/man/gdata-package.Rd Added Paths: ----------- trunk/gdata/R/runRUnitTests.R trunk/gdata/inst/unitTests/runRUnitTests.R trunk/gdata/man/runRUnitTests.Rd Removed Paths: ------------- trunk/gdata/tests/doRUnit.R Added: trunk/gdata/R/runRUnitTests.R =================================================================== --- trunk/gdata/R/runRUnitTests.R (rev 0) +++ trunk/gdata/R/runRUnitTests.R 2008-12-31 13:24:42 UTC (rev 1306) @@ -0,0 +1,27 @@ +### runRUnitTests.R +###------------------------------------------------------------------------ +### What: Run RUnit tests (wrapper function) - R code +### $Id$ +### Time-stamp: <2008-12-30 20:59:11 ggorjan> +###------------------------------------------------------------------------ + +.runRUnitTestsGdata <- function(testFileRegexp="^runit.+\\.[rR]$") +{ + ## Setup + .pkg <- environmentName(environment(.runRUnitTestsGdata)) + .path <- system.file("unitTests", package=.pkg) + .suite <- file.path(.path, "runRUnitTests.R") + + ## Some checks + stopifnot(file.exists(.path), + file.info(path.expand(.path))$isdir, + file.exists(.suite)) + + ## Run the suite + .way <- "function" + source(.suite, local=TRUE) + ## local=TRUE since .pkg and other vars do not exists in .suite environment +} + +###------------------------------------------------------------------------ +### runRUnitTests.R ends here Property changes on: trunk/gdata/R/runRUnitTests.R ___________________________________________________________________ Added: svn:keywords + Modified: trunk/gdata/inst/unitTests/Makefile =================================================================== --- trunk/gdata/inst/unitTests/Makefile 2008-12-20 22:34:57 UTC (rev 1305) +++ trunk/gdata/inst/unitTests/Makefile 2008-12-31 13:24:42 UTC (rev 1306) @@ -1,18 +1,16 @@ TOP=../.. PKG=${shell cd ${TOP};pwd} -SUITE=doRUnit.R -R=${R_HOME}/bin/R +SUITE=runRUnitTests.R +R=R -all: inst test +test: # Run unit tests + ${R} --vanilla --slave < ${SUITE} inst: # Install package cd ${TOP}/..;\ ${R} CMD INSTALL ${PKG} -test: # Run unit tests - export RCMDCHECK=FALSE;\ - cd ${TOP}/tests;\ - ${R} --vanilla --slave < ${SUITE} +all: inst test echo: # Echo env. variables @echo "Package folder: ${PKG}" Added: trunk/gdata/inst/unitTests/runRUnitTests.R =================================================================== --- trunk/gdata/inst/unitTests/runRUnitTests.R (rev 0) +++ trunk/gdata/inst/unitTests/runRUnitTests.R 2008-12-31 13:24:42 UTC (rev 1306) @@ -0,0 +1,104 @@ +### runRUnitTests.R +###------------------------------------------------------------------------ +### What: Run RUnit tests (the core)- R code +### $Id$ +### Time-stamp: <2008-12-30 12:52:51 ggorjan> +###------------------------------------------------------------------------ + +## The setup seems to be quite messy, but it is so to enable use of this in +## several ways as shown bellow. + +## "R CMD check" way should be the most authoritative way to run the RUnit +## tests for a developer. RUnit tests are issued during R CMD check of the +## package due to example section of .runRUnitTests() function. If any test +## fails (failure) or if there are any R errors during RUnit testing, R CMD +## check fails. These are variable values specific for this way: +## - .path DEVEL/PATH/PKG.Rcheck/PKG/unitTests +## - .way function + +## ".runRUnitTests()" way from within R after library(PKG) is handy for +## package useRs, since it enables useRs to be sure that all tests pass for +## their installation. This is just a convenient wrapper function to run +## the RUnit testing suite. These are variable values specific for this +## way: +## - .path INSTALL/PATH/PKG/unitTests +## - .way function + +## "Shell" way is another possibility mainly for a developer in order to +## skip possibly lengthy R CMD check and perform just RUnit testing with an +## installed version of a pcakage. These are variable values specific for +## this way: +## - .path DEVEL/PATH/PKG/inst/unitTests +## - .way shell +## +## Rscript runRUnitTests.R +## R CMD BATCH runRUnitTests.R +## make +## make all + +## Sourced via shell (Makefile, Rscript, R CMD BATCH) +if(!exists(".pkg")) { + .path <- getwd() + .way <- "shell" + .pkg <- c(read.dcf(file="../../DESCRIPTION", fields="Package")) + print(.pkg) + testFileRegexp <- "^base.+\\.[rR]$" +} + +if(require("RUnit", quietly=TRUE)) { + + ## Debugging echo + cat("\nRunning RUnit tests\n") + print(list(pkg=.pkg, getwd=getwd(), pathToRUnitTests=.path)) + + ## Load the package - not needed for .runRUnitTests() + if(.way %in% c("shell")) + library(package=.pkg, character.only=TRUE) + + ## Define tests + testSuite <- defineTestSuite(name=paste(.pkg, "RUnit testing"), + dirs=.path, testFileRegexp=testFileRegexp) + + ## Run + tests <- runTestSuite(testSuite) + + if(file.access(.path, 02) != 0) { + ## cannot write to .path -> use writable one + tdir <- tempfile(paste(.pkg, "RUnitTests", sep="_")) + dir.create(tdir) + pathReport <- file.path(tdir, "report") + } else { + pathReport <- file.path(.path, "report") + } + + ## Print results: + printTextProtocol(tests) + printTextProtocol(tests, + fileName=paste(pathReport, ".txt", sep="")) + + ## Print HTML Version of results: + printHTMLProtocol(tests, + fileName=paste(pathReport, ".html", sep="")) + + cat("\nRUnit reports also written to\n", + pathReport, ".(txt|html)\n\n", sep="") + + ## Return stop() to cause R CMD check stop in case of + ## - failures i.e. FALSE to RUnit tests or + ## - errors i.e. R errors + tmp <- getErrors(tests) + if(tmp$nFail > 0 || tmp$nErr > 0) { + stop(paste("\n\nRUnit testing failed:\n", + " - #test failures: ", tmp$nFail, "\n", + " - #R errors: ", tmp$nErr, "\n\n", sep="")) + } + +} else { + + cat("R package 'RUnit' cannot be loaded - no unit tests run\n", + "for package", .pkg,"\n") + +} + +###------------------------------------------------------------------------ +### runRUnitTests.R ends here Property changes on: trunk/gdata/inst/unitTests/runRUnitTests.R ___________________________________________________________________ Added: svn:keywords + Modified: trunk/gdata/man/gdata-package.Rd =================================================================== --- trunk/gdata/man/gdata-package.Rd 2008-12-20 22:34:57 UTC (rev 1305) +++ trunk/gdata/man/gdata-package.Rd 2008-12-31 13:24:42 UTC (rev 1306) @@ -32,4 +32,13 @@ } +\section{Testing}{ + +If you want to perform the validity/unit testing of the installed +\pkg{ggmisc} package on your own computer, take a look at +\code{\link{.runRUnitTestsGdata}} function - please note that +you need the \pkg{RUnit} package for this to work. + +} + \keyword{package} \ No newline at end of file Added: trunk/gdata/man/runRUnitTests.Rd =================================================================== --- trunk/gdata/man/runRUnitTests.Rd (rev 0) +++ trunk/gdata/man/runRUnitTests.Rd 2008-12-31 13:24:42 UTC (rev 1306) @@ -0,0 +1,54 @@ +% runRUnitTests.Rd +%-------------------------------------------------------------------------- +% What: Run RUnit tests - help +% $Id$ +% Time-stamp: <2008-12-30 20:58:26 ggorjan> +%-------------------------------------------------------------------------- + +\name{.runRUnitTestsGdata} +\alias{.runRUnitTestsGdata} + +\title{Run RUnit tests for the gdata package} + +\description{ + +Run \pkg{RUnit} tests to perform the validity/unit testing of installed +\pkg{gdata} package on your own computer. + +} + +\usage{.runRUnitTestsGdata(testFileRegexp="^runit.+\\\\.[rR]$")} + +\arguments{ + \item{testFileRegexp}{regular expression; see details} +} + +\details{ + +Argument \code{testFileRegexp} can be used to specify different sets of +tests provided by the package. The following values are sensible: +\itemize{ + \item \code{"^runit.+\\\\.[rR]$"} for basic tests +} + +} + +\value{ + +None, just the print out of \pkg{RUnit} testing. + +} + +\seealso{ + \code{\link[RUnit]{defineTestSuite}} in \pkg{RUnit} package +} + +\examples{ + ## Basic testing + .runRUnitTestsGdata() +} + +\keyword{misc} + +%-------------------------------------------------------------------------- +% runRUnitTests.Rd ends here Deleted: trunk/gdata/tests/doRUnit.R =================================================================== --- trunk/gdata/tests/doRUnit.R 2008-12-20 22:34:57 UTC (rev 1305) +++ trunk/gdata/tests/doRUnit.R 2008-12-31 13:24:42 UTC (rev 1306) @@ -1,63 +0,0 @@ -### doRUnit.R -###------------------------------------------------------------------------ -### What: Run unit tests with RUnit -### $Id$ -### Time-stamp: <2007-06-06 14:02:41 ggorjan> -###------------------------------------------------------------------------ - -## unit tests will not be done if RUnit is not available -if(require("RUnit", quietly=TRUE)) { - - ## --- Setup --- - - pkg <- "gdata" - if(Sys.getenv("RCMDCHECK") == "FALSE") { - ## Path to unit tests for standalone running under Makefile (not R CMD check) - ## PKG/tests/../inst/unitTests - path <- file.path(getwd(), "..", "inst", "unitTests") - } else { - ## Path to unit tests for R CMD check - ## PKG.Rcheck/tests/../PKG/unitTests - path <- system.file(package=pkg, "unitTests") - } - cat("\nRunning unit tests\n") - print(list(pkg=pkg, getwd=getwd(), pathToUnitTests=path)) - - library(package=pkg, character.only=TRUE) - - ## --- Testing --- - - ## Define tests - testSuite <- defineTestSuite(name=paste(pkg, "unit testing"), - dirs=path) - ## Run - tests <- runTestSuite(testSuite) - - ## Default report name - pathReport <- file.path(path, "report") - - ## Report to stdout and text files - cat("------------------- UNIT TEST SUMMARY ---------------------\n\n") - printTextProtocol(tests, showDetails=FALSE) - printTextProtocol(tests, showDetails=FALSE, - fileName=paste(pathReport, "Summary.txt", sep="")) - printTextProtocol(tests, showDetails=TRUE, - fileName=paste(pathReport, ".txt", sep="")) - - ## Report to HTML file - printHTMLProtocol(tests, fileName=paste(pathReport, ".html", sep="")) - - ## Return stop() to cause R CMD check stop in case of - ## - failures i.e. FALSE to unit tests or - ## - errors i.e. R errors - tmp <- getErrors(tests) - if(tmp$nFail > 0 | tmp$nErr > 0) { - stop(paste("\n\nunit testing failed (#test failures: ", tmp$nFail, - ", #R errors: ", tmp$nErr, ")\n\n", sep="")) - } -} else { - warning("cannot run unit tests -- package RUnit is not available") -} - -###------------------------------------------------------------------------ -### doRUnit.R ends here This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gg...@us...> - 2008-12-20 22:35:01
|
Revision: 1305 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1305&view=rev Author: ggorjan Date: 2008-12-20 22:34:57 +0000 (Sat, 20 Dec 2008) Log Message: ----------- Modified Paths: -------------- trunk/gdata/NAMESPACE trunk/gdata/inst/NEWS Added Paths: ----------- trunk/gdata/R/trimSum.R trunk/gdata/inst/unitTests/runit.trimSum.R trunk/gdata/man/trimSum.Rd Modified: trunk/gdata/NAMESPACE =================================================================== --- trunk/gdata/NAMESPACE 2008-12-20 22:28:35 UTC (rev 1304) +++ trunk/gdata/NAMESPACE 2008-12-20 22:34:57 UTC (rev 1305) @@ -23,6 +23,7 @@ reorder.factor, resample, trim, + trimSum, unmatrix, upperTriangle, "upperTriangle<-", Added: trunk/gdata/R/trimSum.R =================================================================== --- trunk/gdata/R/trimSum.R (rev 0) +++ trunk/gdata/R/trimSum.R 2008-12-20 22:34:57 UTC (rev 1305) @@ -0,0 +1,37 @@ +### trimSum.R +###------------------------------------------------------------------------ +### What: Sum trimmed values - code +### $Id$ +### Time-stamp: <2008-12-20 12:11:27 ggorjan> +###------------------------------------------------------------------------ + +trimSum <- function(x, n, right=TRUE, na.rm=FALSE, ...) +{ + ## --- Setup --- + + if(!is.vector(x) | is.list(x)) + stop("'x' must be a vector - for now") + if(!is.numeric(x)) + stop("'x' must be numeric") + if(length(x) <= n) + stop("'n' must be smaller than the length of x") + + ## --- Trim --- + + N <- length(x) + if(right) { + x2 <- x[1:n] + x2[n] <- sum(x[n:N], na.rm=na.rm) + } else { + k <- (N - n + 1) + x2 <- x[k:N] + x2[1] <- sum(x[1:k], na.rm=na.rm) + } + + ## --- Return --- + + x2 +} + +###------------------------------------------------------------------------ +### trimSum.R ends here Modified: trunk/gdata/inst/NEWS =================================================================== --- trunk/gdata/inst/NEWS 2008-12-20 22:28:35 UTC (rev 1304) +++ trunk/gdata/inst/NEWS 2008-12-20 22:34:57 UTC (rev 1305) @@ -1,6 +1,8 @@ CHANGES IN 2.5.0 (2008-??-??) ----------------------------- +- New function trimSum that sums trimmed values + - New function cbindX that can bind objects with different number of rows. - write.fwf gains width argument. Unknown values can increase or decrease Added: trunk/gdata/inst/unitTests/runit.trimSum.R =================================================================== --- trunk/gdata/inst/unitTests/runit.trimSum.R (rev 0) +++ trunk/gdata/inst/unitTests/runit.trimSum.R 2008-12-20 22:34:57 UTC (rev 1305) @@ -0,0 +1,61 @@ +### runit.trimSum.R +###------------------------------------------------------------------------ +### What: Unit tests for trimSum +### $Id$ +### Time-stamp: <2008-12-20 11:58:50 ggorjan> +###------------------------------------------------------------------------ + +### {{{ --- Test setup --- + +if(FALSE) { + library("RUnit") + library("gdata") +} + +### }}} +### {{{ --- trimSum --- + +test.trimSum <- function() +{ + + ## 'x' must be a vector - for now + checkException(trimSum(matrix(1:10))) + checkException(trimSum(data.frame(1:10))) + checkException(trimSum(list(1:10))) + + ## 'x' must be numeric + checkException(trimSum(letters)) + + ## 'n' must be smaller than the length of x + checkException(trimSum(x=1:10, n=11)) + checkException(trimSum(x=1, n=1)) + + ## Default + x <- trimSum(x=1:10, n=5) + x2 <- c(1:4, 45) + checkEquals(x, x2) + + ## Left + x <- trimSum(x=1:10, n=5, right=FALSE) + x2 <- c(21, 7:10) + checkEquals(x, x2) + + ## NA + x <- trimSum(x=c(1:9, NA), n=5) + x2 <- c(1:4, NA) + checkEquals(x, x2) + + x <- trimSum(x=c(1:9, NA), n=5, na.rm=TRUE) + x2 <- c(1:4, 35) + checkEquals(x, x2) +} + +### }}} +### {{{ Dear Emacs +## Local variables: +## folded-file: t +## End: +### }}} + +###------------------------------------------------------------------------ +### runit.trimSum.R ends here Added: trunk/gdata/man/trimSum.Rd =================================================================== --- trunk/gdata/man/trimSum.Rd (rev 0) +++ trunk/gdata/man/trimSum.Rd 2008-12-20 22:34:57 UTC (rev 1305) @@ -0,0 +1,52 @@ +% trimSum.Rd +%-------------------------------------------------------------------------- +% What: Sum trimmed values - help +% $Id$ +% Time-stamp: <2008-12-20 00:15:57 ggorjan> +%-------------------------------------------------------------------------- + +\name{trimSum} + +\alias{trimSum} + +\title{Trim a vector such that the last/first value represents the sum of + trimmed values} + +\description{\code{trimSum} trims (shortens) a vector in such a way that + the last or first value represents the sum of trimmed values. User needs + to specify the desired length of a trimmed vector. +} + +\usage{trimSum(x, n, right=TRUE, na.rm=FALSE, \ldots)} + +\arguments{ + \item{x}{numeric, a vector of numeric values} + \item{n}{numeric, desired length of the output} + \item{right}{logical, trim on the right/bottom or the left/top side} + \item{na.rm}{logical, remove \code{NA} values when applying a function} + \item{\ldots}{arguments passed to other methods - currently not used} +} + +\value{Trimmed vector with a last/first value representing the sum of + trimmed values} + +\author{Gregor Gorjanc} + +\seealso{\code{\link[gdata]{trim}}} + +\examples{ + +x <- 1:10 +trimSum(x, n=5) +trimSum(x, n=5, right=FALSE) + +x[9] <- NA +trimSum(x, n=5) +trimSum(x, n=5, na.rm=TRUE) + +} + +\keyword{manip} + +%-------------------------------------------------------------------------- +% trimSum.Rd ends here This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gg...@us...> - 2008-12-20 22:28:58
|
Revision: 1304 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1304&view=rev Author: ggorjan Date: 2008-12-20 22:28:35 +0000 (Sat, 20 Dec 2008) Log Message: ----------- To remove some output in the R CMD check Modified Paths: -------------- trunk/gdata/tests/tests.write.fwf.Rout.save Modified: trunk/gdata/tests/tests.write.fwf.Rout.save =================================================================== --- trunk/gdata/tests/tests.write.fwf.Rout.save 2008-08-15 13:15:26 UTC (rev 1303) +++ trunk/gdata/tests/tests.write.fwf.Rout.save 2008-12-20 22:28:35 UTC (rev 1304) @@ -21,7 +21,7 @@ > ### tests.write.fwf.R > ###------------------------------------------------------------------------ > ### What: Tests for write.fwf -> ### $Id: tests.write.fwf.R 997 2006-10-30 19:04:53Z ggorjan $ +> ### $Id: tests.write.fwf.R 1300 2008-08-05 11:47:18Z ggorjan $ > ### Time-stamp: <2008-08-05 12:25:05 ggorjan> > ###------------------------------------------------------------------------ > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2008-08-15 13:15:28
|
Revision: 1303 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1303&view=rev Author: warnes Date: 2008-08-15 13:15:26 +0000 (Fri, 15 Aug 2008) Log Message: ----------- Add keywords() function to show /doc/KEYWORDS file Modified Paths: -------------- trunk/gtools/DESCRIPTION trunk/gtools/NAMESPACE Added Paths: ----------- trunk/gtools/R/keywords.R trunk/gtools/man/keywords.Rd Modified: trunk/gtools/DESCRIPTION =================================================================== --- trunk/gtools/DESCRIPTION 2008-08-14 20:06:22 UTC (rev 1302) +++ trunk/gtools/DESCRIPTION 2008-08-15 13:15:26 UTC (rev 1303) @@ -1,8 +1,8 @@ Package: gtools Title: Various R programming tools Description: Various R programming tools -Version: 2.5.0 -Date: 2008-05-22 +Version: 2.6.0 +Date: 2008-08-15 Author: Gregory R. Warnes. Includes R source code and/or documentation contributed by Ben Bolker and Thomas Lumley Maintainer: Gregory R. Warnes <wa...@bs...> Modified: trunk/gtools/NAMESPACE =================================================================== --- trunk/gtools/NAMESPACE 2008-08-14 20:06:22 UTC (rev 1302) +++ trunk/gtools/NAMESPACE 2008-08-15 13:15:26 UTC (rev 1303) @@ -15,6 +15,7 @@ foldchange2logratio, inv.logit, invalid, + keywords, logit, logratio2foldchange, mixedorder, Added: trunk/gtools/R/keywords.R =================================================================== --- trunk/gtools/R/keywords.R (rev 0) +++ trunk/gtools/R/keywords.R 2008-08-15 13:15:26 UTC (rev 1303) @@ -0,0 +1,5 @@ +keywords <- function( ... ) +{ + file <- file.path(R.home("doc"),"KEYWORDS") + file.show(file, ...) +} Added: trunk/gtools/man/keywords.Rd =================================================================== --- trunk/gtools/man/keywords.Rd (rev 0) +++ trunk/gtools/man/keywords.Rd 2008-08-15 13:15:26 UTC (rev 1303) @@ -0,0 +1,25 @@ +\name{keywords} +\alias{keywords} +\title{List valid keywords for R man pages} +\description{ + List valid keywords for R man pages +} +\usage{ +keywords(...) +} +\arguments{ + \item{\dots}{Optional argumenst to pass to show.file()} +} +\details{ + This function simply determines the path $RHOME/doc/KEYWORDS and calls + show.file() to display it. +} +\value{ + Nothing of interest. +} +\author{Gregory R. Warnes \email{gr...@ra...}} +\seealso{ \code{\link[utils]{help}} } +\examples{ +keywords() +} +\keyword{documentation} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2008-08-14 20:06:27
|
Revision: 1302 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1302&view=rev Author: warnes Date: 2008-08-14 20:06:22 +0000 (Thu, 14 Aug 2008) Log Message: ----------- balloonpot() was incorrectly displaying warning about z values below 0 when scale.method="relative". Fixed. Modified Paths: -------------- trunk/gplots/R/balloonplot.R Modified: trunk/gplots/R/balloonplot.R =================================================================== --- trunk/gplots/R/balloonplot.R 2008-08-07 13:40:43 UTC (rev 1301) +++ trunk/gplots/R/balloonplot.R 2008-08-14 20:06:22 UTC (rev 1302) @@ -77,7 +77,7 @@ scale.method <- match.arg(scale.method) scale.range <- match.arg(scale.range) - if( any(z < 0, na.rm=TRUE ) ) + if( scale.method=="absolute" && any(z < 0, na.rm=TRUE ) ) warning("z value(s) below zero detected.", " No balloons will be displayed for these cells.") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |