r-gregmisc-users Mailing List for R gregmisc package (Page 22)
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...> - 2011-08-26 23:35:16
|
Revision: 1484 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1484&view=rev Author: warnes Date: 2011-08-26 23:35:07 +0000 (Fri, 26 Aug 2011) Log Message: ----------- Update Greg's email address. Modified Paths: -------------- trunk/fork/DESCRIPTION Modified: trunk/fork/DESCRIPTION =================================================================== --- trunk/fork/DESCRIPTION 2011-08-26 23:28:17 UTC (rev 1483) +++ trunk/fork/DESCRIPTION 2011-08-26 23:35:07 UTC (rev 1484) @@ -1,14 +1,13 @@ Package: fork Title: R functions for handling multiple processes. -Version: 1.2.3 -Date: 2009-07-17 +Version: 1.2.4 +Date: 2011-08-26 Author: Gregory R. Warnes <gr...@ra...>. Financial support for some aspects of this package provided by Metrum Research Group, LLC <http://www.metrumrg.com>. Description: These functions provides simple wrappers around the Unix process management API calls: fork, signal, wait, waitpid, kill, and _exit. This enables construction of programs that utilize and mange multiple concurrent - processes. Commercial support for this package available from - Random Technologies, LLC <http://www.random-technologies-llc.com> -Maintainer: Gregory R. Warnes <gr...@ra...> + processes. +Maintainer: Gregory R. Warnes <gr...@wa...> License: GPL-2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-26 23:28:23
|
Revision: 1483 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1483&view=rev Author: warnes Date: 2011-08-26 23:28:17 +0000 (Fri, 26 Aug 2011) Log Message: ----------- Use packageStartupMessage() instead of warning() to display a startup message on package load. Modified Paths: -------------- trunk/gregmisc/R/First.R Modified: trunk/gregmisc/R/First.R =================================================================== --- trunk/gregmisc/R/First.R 2011-08-26 20:48:15 UTC (rev 1482) +++ trunk/gregmisc/R/First.R 2011-08-26 23:28:17 UTC (rev 1483) @@ -2,13 +2,10 @@ .First.lib <- function(libname, pkgname) { - library(gdata) - library(gplots) - library(gmodels) - library(gtools) - warning(paste("", - "The `gregmisc' *package* has converted into a *bundle*", - "containing four sub-packages: gdata, gtools, gmodels, and gplots.", - "Please load these packages directly.", sep="\n\t"), - call.=FALSE) + packageStartupMessage( + "All functionality of the `gregmisc' package has been moved", + "into the four 'g' packages: gdata, gtools, gmodels, and gplots. ", + "This package is retained to make it easy to install and load", + "the set. Please consider loading these packages directly." + ) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-26 20:48:23
|
Revision: 1482 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1482&view=rev Author: warnes Date: 2011-08-26 20:48:15 +0000 (Fri, 26 Aug 2011) Log Message: ----------- Update Greg's email address Modified Paths: -------------- trunk/fork/man/exit.Rd trunk/fork/man/fork.Rd trunk/fork/man/getpid.Rd trunk/fork/man/handleSIGCLD.Rd trunk/fork/man/kill.Rd trunk/fork/man/signal.Rd trunk/fork/man/signame.Rd trunk/fork/man/wait.Rd Modified: trunk/fork/man/exit.Rd =================================================================== --- trunk/fork/man/exit.Rd 2011-08-26 20:45:32 UTC (rev 1481) +++ trunk/fork/man/exit.Rd 2011-08-26 20:48:15 UTC (rev 1482) @@ -25,7 +25,7 @@ argument, so it is usually not necessary to directly call exit(). } \references{"\_exit" man page} -\author{ Gregory R. Warnes \email{gr...@ra...}} +\author{ Gregory R. Warnes \email{gr...@wa...}} \seealso{\code{\link{fork}}, \code{\link{getpid}}, \code{\link{wait}}, \code{\link{kill}}, \code{\link{killall}} } \examples{ Modified: trunk/fork/man/fork.Rd =================================================================== --- trunk/fork/man/fork.Rd 2011-08-26 20:45:32 UTC (rev 1481) +++ trunk/fork/man/fork.Rd 2011-08-26 20:48:15 UTC (rev 1482) @@ -88,7 +88,7 @@ function returns 0 to the child process. } \references{'fork' man page} -\author{ Gregory R. Warnes \email{gr...@ra...}} +\author{ Gregory R. Warnes \email{gr...@wa...}} \seealso{\code{\link{getpid}}, \code{\link{exit}}, \code{\link{wait}}, \code{\link{kill}}, \code{\link{killall}} } \examples{ Modified: trunk/fork/man/getpid.Rd =================================================================== --- trunk/fork/man/getpid.Rd 2011-08-26 20:45:32 UTC (rev 1481) +++ trunk/fork/man/getpid.Rd 2011-08-26 20:48:15 UTC (rev 1482) @@ -15,7 +15,7 @@ Integer process id. } \references{Unix "getpid" man page} -\author{ Gregory R. Warnes \email{gr...@ra...}} +\author{ Gregory R. Warnes \email{gr...@wa...}} \seealso{\code{\link{fork}}, \code{\link{exit}}, \code{\link{wait}}, \code{\link{kill}}, \code{\link{killall}} } \examples{ Modified: trunk/fork/man/handleSIGCLD.Rd =================================================================== --- trunk/fork/man/handleSIGCLD.Rd 2011-08-26 20:45:32 UTC (rev 1481) +++ trunk/fork/man/handleSIGCLD.Rd 2011-08-26 20:48:15 UTC (rev 1482) @@ -30,7 +30,7 @@ } \references{W.R. Stevens and S.A. Rago, Advanced Programming in the UNIX environment, 2nd ed. (c) 2005, Pearson Education, pp 308-310.} -\author{Gregory R. Warnes \email{gr...@ra...}, +\author{Gregory R. Warnes \email{gr...@wa...}, with financial support from Metrum Research Group, LLC \url{http://www.metrumrg.com}. } Modified: trunk/fork/man/kill.Rd =================================================================== --- trunk/fork/man/kill.Rd 2011-08-26 20:45:32 UTC (rev 1481) +++ trunk/fork/man/kill.Rd 2011-08-26 20:48:15 UTC (rev 1482) @@ -28,7 +28,7 @@ \code{killall} does not return a value. } \references{"kill" and "waitpid" man pages} -\author{ Gregory R. Warnes \email{gr...@ra...}} +\author{ Gregory R. Warnes \email{gr...@wa...}} \seealso{\code{\link{getpid}}, \code{\link{exit}}, \code{\link{wait}}, \code{\link{kill}}, \code{\link{killall}} } \examples{ Modified: trunk/fork/man/signal.Rd =================================================================== --- trunk/fork/man/signal.Rd 2011-08-26 20:45:32 UTC (rev 1481) +++ trunk/fork/man/signal.Rd 2011-08-26 20:48:15 UTC (rev 1482) @@ -22,7 +22,7 @@ Nothing of interest. } \references{ See the unix man page for "signal" for more information} -\author{Gregory R. Warnes \email{gr...@ra...}, +\author{Gregory R. Warnes \email{gr...@wa...}, with financial support from Metrum Research Group, LLC \url{http://www.metrumrg.com}. } Modified: trunk/fork/man/signame.Rd =================================================================== --- trunk/fork/man/signame.Rd 2011-08-26 20:45:32 UTC (rev 1481) +++ trunk/fork/man/signame.Rd 2011-08-26 20:48:15 UTC (rev 1482) @@ -29,7 +29,7 @@ \item{desc}{Description} } \references{Unix "signal" man page.} -\author{ Gregory R. Warnes \email{gr...@ra...}} +\author{ Gregory R. Warnes \email{gr...@wa...}} \seealso{\code{\link{getpid}}, \code{\link{exit}}, \code{\link{wait}}, \code{\link{kill}}, \code{\link{killall}} } \examples{ Modified: trunk/fork/man/wait.Rd =================================================================== --- trunk/fork/man/wait.Rd 2011-08-26 20:45:32 UTC (rev 1481) +++ trunk/fork/man/wait.Rd 2011-08-26 20:48:15 UTC (rev 1482) @@ -34,7 +34,7 @@ and the meanings of the status indicator. } \references{"wait" and "waitpid" man pages} -\author{ Gregory R. Warnes \email{gr...@ra...}} +\author{ Gregory R. Warnes \email{gr...@wa...}} \seealso{\code{\link{fork}}, \code{\link{exit}}, \code{\link{getpid}}, \code{\link{kill}}, \code{\link{killall}}} \examples{ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-26 20:45:38
|
Revision: 1481 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1481&view=rev Author: warnes Date: 2011-08-26 20:45:32 +0000 (Fri, 26 Aug 2011) Log Message: ----------- Update Greg's email address Modified Paths: -------------- trunk/SII/man/SII-package.Rd Modified: trunk/SII/man/SII-package.Rd =================================================================== --- trunk/SII/man/SII-package.Rd 2011-08-26 20:44:35 UTC (rev 1480) +++ trunk/SII/man/SII-package.Rd 2011-08-26 20:45:32 UTC (rev 1481) @@ -19,7 +19,7 @@ required frequencies. } \author{ - Gregory R. Warnes \email{su...@ra...} + Gregory R. Warnes \email{gr...@wa...} } \references{ ANSI S3.5-1997, "American National Standard Methods for This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-26 20:44:41
|
Revision: 1480 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1480&view=rev Author: warnes Date: 2011-08-26 20:44:35 +0000 (Fri, 26 Aug 2011) Log Message: ----------- Update Greg's email address Modified Paths: -------------- trunk/SII/DESCRIPTION Modified: trunk/SII/DESCRIPTION =================================================================== --- trunk/SII/DESCRIPTION 2011-08-26 20:41:56 UTC (rev 1479) +++ trunk/SII/DESCRIPTION 2011-08-26 20:44:35 UTC (rev 1480) @@ -1,10 +1,10 @@ Package: SII Type: Package Title: Calculate ANSI S3.5-1997 Speech Intelligibility Index -Version: 1.0.0 -Date: 2010-07-22 +Version: 1.0.1 +Date: 2011-08-26 Author: Gregory R. Warnes -Maintainer: Gregory R. Warnes <su...@ra...> +Maintainer: Gregory R. Warnes <gr...@wa...> Description: This package calculates ANSI S3.5-1997 Speech Intelligibility Index (SII), a standard method for computing the intelligibility of This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-26 20:42:04
|
Revision: 1479 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1479&view=rev Author: warnes Date: 2011-08-26 20:41:56 +0000 (Fri, 26 Aug 2011) Log Message: ----------- Update Greg's email address Modified Paths: -------------- trunk/gregmisc/DESCRIPTION Modified: trunk/gregmisc/DESCRIPTION =================================================================== --- trunk/gregmisc/DESCRIPTION 2011-08-26 20:38:12 UTC (rev 1478) +++ trunk/gregmisc/DESCRIPTION 2011-08-26 20:41:56 UTC (rev 1479) @@ -9,7 +9,7 @@ way to access the original combined functionality. To this end, it simply depends on all of the new packages so that these will installed/loaded when this package is installed/loaded. -Version: 2.1.1 +Version: 2.1.2 Author: Gregory R. Warnes. -Maintainer: Gregory R. Warnes <wa...@bs...> +Maintainer: Gregory R. Warnes <gr...@wa...> License: GPL-2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-26 20:38:19
|
Revision: 1478 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1478&view=rev Author: warnes Date: 2011-08-26 20:38:12 +0000 (Fri, 26 Aug 2011) Log Message: ----------- Update NEWS for 2.10.0 release Modified Paths: -------------- trunk/gplots/inst/NEWS Modified: trunk/gplots/inst/NEWS =================================================================== --- trunk/gplots/inst/NEWS 2011-08-26 20:29:58 UTC (rev 1477) +++ trunk/gplots/inst/NEWS 2011-08-26 20:38:12 UTC (rev 1478) @@ -1,3 +1,25 @@ +Release 2.10.0 - 2011-08-26 +--------------------------- + +New Features: + +- New ci2d() function to create 2-dimensional empirical confidence + intervals utilizing hist2d(). See ?ci2d for details. + +- Add 'alpha' argument to rich.colors() to control transparency. + +Improvements: + +- Accellerate hist2d by replacing for() loop with tapply(), and allow + user to specify summary function applied (per suggestion by Peter + Hagedorn). + +Bug Fixes: + +- Correct error in heatmap.2() that arises when data includes NA values + (identified by Melissa Key). + + Release 2.8.0 - 2010-06-10 -------------------------- @@ -15,7 +37,7 @@ Improvements: -- Performance of 'hist2d' improved thanks to a suggestion from i +- Performance of 'hist2d' improved thanks to a suggestion from Joerg van den Hoff. Release 2.7.4 - 2009-11-12 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-26 20:30:04
|
Revision: 1477 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1477&view=rev Author: warnes Date: 2011-08-26 20:29:58 +0000 (Fri, 26 Aug 2011) Log Message: ----------- Add dependency on R>= 2.10 to handle compressed Rda data file. Modified Paths: -------------- trunk/gplots/DESCRIPTION Modified: trunk/gplots/DESCRIPTION =================================================================== --- trunk/gplots/DESCRIPTION 2011-08-26 13:45:26 UTC (rev 1476) +++ trunk/gplots/DESCRIPTION 2011-08-26 20:29:58 UTC (rev 1477) @@ -3,6 +3,7 @@ Description: Various R programming tools for plotting data Depends: gtools, gdata, stats, caTools, grid Recommends: datasets, grid, MASS +Requires: R (>= 2.10) Suggests: gtools Version: 2.9.0 Date: 2011-08-15 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-26 13:45:34
|
Revision: 1476 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1476&view=rev Author: warnes Date: 2011-08-26 13:45:26 +0000 (Fri, 26 Aug 2011) Log Message: ----------- Compress rtPCR example data set to make distributed package smaller. Modified Paths: -------------- trunk/gplots/data/rtPCR.rda Modified: trunk/gplots/data/rtPCR.rda =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-26 13:39:37
|
Revision: 1475 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1475&view=rev Author: warnes Date: 2011-08-26 13:39:31 +0000 (Fri, 26 Aug 2011) Log Message: ----------- Remove '1.0' confidence line from ci2d(..,show="contour"). Modified Paths: -------------- trunk/gplots/R/ci2d.R Modified: trunk/gplots/R/ci2d.R =================================================================== --- trunk/gplots/R/ci2d.R 2011-08-25 03:10:05 UTC (rev 1474) +++ trunk/gplots/R/ci2d.R 2011-08-26 13:39:31 UTC (rev 1475) @@ -38,27 +38,41 @@ h2d$density <- h2d$counts / sum(h2d$counts, na.rm=TRUE) uniqueVals <- rev(unique(sort(h2d$density))) - cumProbs <- sapply( uniqueVals, function(val) sum( h2d$density[h2d$density>=val] ) ) + cumProbs <- sapply(uniqueVals, + function(val) sum( h2d$density[h2d$density>=val] ) ) names(cumProbs) <- uniqueVals h2d$cumDensity <- matrix(nrow=nrow(h2d$density), ncol=ncol(h2d$density)) h2d$cumDensity[] <- cumProbs[as.character(h2d$density)] if(show=="image") { - image( h2d$x, h2d$y, h2d$cumDensity, xlab=xlab, ylab=ylab, breaks=breaks, col=col) + image(h2d$x, h2d$y, h2d$cumDensity, + xlab=xlab, ylab=ylab, + breaks=breaks, col=col) } else if(show=="filled.contour") { filled.contour(h2d$x, h2d$y, h2d$cumDensity, levels=breaks, col=col, - key.axes={axis(4, at=breaks); title("\nCI Level")} + key.axes={ axis(4, at=breaks); + title("\nCI Level") } ) } else if(show=="contour") - contour(h2d$x, h2d$y, h2d$cumDensity, levels=breaks, nlevels=length(breaks)) + { + tmpBreaks <- breaks[breaks<1] # avoid having 1.0 line + contour(h2d$x, h2d$y, h2d$cumDensity, + levels=tmpBreaks, + labels=tmpBreaks, + nlevels=length(tmpBreaks), + col=col + ) + } + - h2d$contours <- contourLines(h2d$x, h2d$y, h2d$cumDensity, levels=breaks, nlevels=length(breaks)) + h2d$contours <- contourLines(h2d$x, h2d$y, h2d$cumDensity, + levels=breaks, nlevels=length(breaks)) names invisible(h2d) } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-25 03:10:11
|
Revision: 1474 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1474&view=rev Author: warnes Date: 2011-08-25 03:10:05 +0000 (Thu, 25 Aug 2011) Log Message: ----------- - Add 'ci2d()' to compute 2-dimensional emipirical confidence interval. - Fix parse error in help page for 'rich.colors()'. Modified Paths: -------------- trunk/gplots/DESCRIPTION trunk/gplots/NAMESPACE trunk/gplots/man/rich.colors.Rd Added Paths: ----------- trunk/gplots/R/ci2d.R trunk/gplots/man/ci2d.Rd Modified: trunk/gplots/DESCRIPTION =================================================================== --- trunk/gplots/DESCRIPTION 2011-08-16 01:17:20 UTC (rev 1473) +++ trunk/gplots/DESCRIPTION 2011-08-25 03:10:05 UTC (rev 1474) @@ -4,7 +4,7 @@ Depends: gtools, gdata, stats, caTools, grid Recommends: datasets, grid, MASS Suggests: gtools -Version: 2.8.1 +Version: 2.9.0 Date: 2011-08-15 Author: Gregory R. Warnes. Includes R source code and/or documentation contributed by (in alphabetical order): Modified: trunk/gplots/NAMESPACE =================================================================== --- trunk/gplots/NAMESPACE 2011-08-16 01:17:20 UTC (rev 1473) +++ trunk/gplots/NAMESPACE 2011-08-25 03:10:05 UTC (rev 1474) @@ -4,6 +4,7 @@ barplot2, bluered, boxplot.n, + ci2d, col2hex, colorpanel, greenred, Added: trunk/gplots/R/ci2d.R =================================================================== --- trunk/gplots/R/ci2d.R (rev 0) +++ trunk/gplots/R/ci2d.R 2011-08-25 03:10:05 UTC (rev 1474) @@ -0,0 +1,64 @@ +## first(...) selects the first element of which(...) +first <- function(x,...) + { + w <- which(x,...) + if(length(x)>1) + w[1] + else + w +} + +## first(...) selects the first element of which(...) +last <- function(x,...) + { + w <- which(x,...) + if(length(x)>1) + rev(w)[1] + else + w +} + +## non-parametric 2 dimensional approximate confidence interval +## based on 2 dimensional histogram +ci2d <- function(x, + y = NULL, + nbins=25, + ci.levels=c(0.50,0.75,0.90,0.95,0.975), + show=c("filled.contour","contour","image","none"), + xlab=deparse(substitute(x)), + ylab=deparse(substitute(y)), + col=topo.colors(length(breaks)-1), + ...) + { + + show=match.arg(show) + breaks <- unique(c(0, ci.levels, 1.0)) + + h2d <- hist2d(x,y, show=FALSE, nbins=nbins, ...) + h2d$density <- h2d$counts / sum(h2d$counts, na.rm=TRUE) + + uniqueVals <- rev(unique(sort(h2d$density))) + cumProbs <- sapply( uniqueVals, function(val) sum( h2d$density[h2d$density>=val] ) ) + names(cumProbs) <- uniqueVals + h2d$cumDensity <- matrix(nrow=nrow(h2d$density), ncol=ncol(h2d$density)) + h2d$cumDensity[] <- cumProbs[as.character(h2d$density)] + + if(show=="image") + { + image( h2d$x, h2d$y, h2d$cumDensity, xlab=xlab, ylab=ylab, breaks=breaks, col=col) + } + else if(show=="filled.contour") + { + filled.contour(h2d$x, h2d$y, h2d$cumDensity, + levels=breaks, + col=col, + key.axes={axis(4, at=breaks); title("\nCI Level")} + ) + } + else if(show=="contour") + contour(h2d$x, h2d$y, h2d$cumDensity, levels=breaks, nlevels=length(breaks)) + + h2d$contours <- contourLines(h2d$x, h2d$y, h2d$cumDensity, levels=breaks, nlevels=length(breaks)) + names + invisible(h2d) + } Added: trunk/gplots/man/ci2d.Rd =================================================================== --- trunk/gplots/man/ci2d.Rd (rev 0) +++ trunk/gplots/man/ci2d.Rd 2011-08-25 03:10:05 UTC (rev 1474) @@ -0,0 +1,76 @@ +\name{ci2d} +\alias{ci2d} +\title{ + Create 2-dimensional empirical confidence regions +} +\description{ + Create 2-dimensional empirical confidence regions based on a + 2-dimensoinal histogram. +} +\usage{ +ci2d(x, y=NULL, + nbins=25, + ci.levels=c(0.5, 0.75, 0.9, 0.95, 0.975), + show=c("filled.contour", "contour", "image", "none"), + xlab=deparse(substitute(x)), + ylab=deparse(substitute(y)), + col=topo.colors(length(breaks) - 1), + ...) +} +\arguments{ + \item{x}{either a vector containing the x coordinates + or a matrix with 2 columns. } + \item{y}{a vector contianing the y coordinates, not required if `x' + is matrix} + \item{nbins}{number of bins in each dimension. May be a scalar or a + 2 element vector. Defaults to 25.} + \item{ci.levels}{Confidence level(s) to use for plotting + data. Defaults to \code{c(0.5, 0.75, 0.9, 0.95, 0.975)} } + \item{show}{Plot type to be displaed. One of "filled.contour", + "contour", "image", or "none". Defaults to "filled.contour".} + \item{xlab, ylab}{Axis labels} + \item{col}{Colors to use for plots.} + \item{\dots}{Additional arguments passed to \code{hist2d}. } +} +\details{ + This function utilizes \code{hist2d} to create a 2-dimensional + histogram of the data passed as an argument. This data is then + converted into densities and used to create and display confidence + regions. +} +\value{ + A list containing 3 elements: + \item{counts}{Matrix containing the number of points falling into each + bin} + \item{x}{lower x limit of each bin} + \item{y}{lower y limit of each bin} + \item{density}{Matrix containing the probability density of each bin (count in bin/total + count)} + \item{cumDensity}{Matrix where each element contains the cumulative probability density + of all elements with the same density (used to create the confidence + region plots) } + \item{contours}{Contours of each confidence region} +} +%\references{ +%} +\author{ Gregory R. Warnes \email{gr...@wa...}} +\seealso{ + \code{\link{hist2d}} +} +\examples{ + # example data, bivariate normal, no correlation + x <- rnorm(2000, sd=4) + y <- rnorm(2000, sd=1) + + # 2-d confidence intervals based on 2d histogram + ci2d(x,y) + + # same scale for each axis, this looks oval + ci2d(x,y, same.scale=TRUE) + +} +% Add one or more standard keywords, see file 'KEYWORDS' in the +% R documentation directory. +\keyword{dplot} +\keyword{hplot} +\keyword{nonparametric} Modified: trunk/gplots/man/rich.colors.Rd =================================================================== --- trunk/gplots/man/rich.colors.Rd 2011-08-16 01:17:20 UTC (rev 1473) +++ trunk/gplots/man/rich.colors.Rd 2011-08-25 03:10:05 UTC (rev 1474) @@ -15,7 +15,7 @@ black-blue-white.} \item{alpha}{alpha transparency, from 0 (fully transparent) to 1 (opaque).} - \item{rgb}{if ‘TRUE’ then a matrix of RGBA values is included as an + \item{rgb}{if \code{TRUE} then a matrix of RGBA values is included as an attribute.} \item{plot}{whether to plot a descriptive color diagram.} } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-16 01:17:26
|
Revision: 1473 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1473&view=rev Author: warnes Date: 2011-08-16 01:17:20 +0000 (Tue, 16 Aug 2011) Log Message: ----------- Update DESCRIPTION file for 2.8.1. Modified Paths: -------------- trunk/gplots/DESCRIPTION Modified: trunk/gplots/DESCRIPTION =================================================================== --- trunk/gplots/DESCRIPTION 2011-08-16 01:16:00 UTC (rev 1472) +++ trunk/gplots/DESCRIPTION 2011-08-16 01:17:20 UTC (rev 1473) @@ -2,10 +2,10 @@ Title: Various R programming tools for plotting data Description: Various R programming tools for plotting data Depends: gtools, gdata, stats, caTools, grid -Recommends: datasets, grid +Recommends: datasets, grid, MASS Suggests: gtools -Version: 2.8.0 -Date: 2010-06-10 +Version: 2.8.1 +Date: 2011-08-15 Author: Gregory R. Warnes. Includes R source code and/or documentation contributed by (in alphabetical order): Ben Bolker, Lodewijk Bonebakker, Robert Gentleman, Wolfgang This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-16 01:16:06
|
Revision: 1472 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1472&view=rev Author: warnes Date: 2011-08-16 01:16:00 +0000 (Tue, 16 Aug 2011) Log Message: ----------- Add 'alpha' argument to rich.colors() to control transparency. Modified Paths: -------------- trunk/gplots/R/rich.colors.R trunk/gplots/man/rich.colors.Rd Modified: trunk/gplots/R/rich.colors.R =================================================================== --- trunk/gplots/R/rich.colors.R 2011-08-16 01:03:31 UTC (rev 1471) +++ trunk/gplots/R/rich.colors.R 2011-08-16 01:16:00 UTC (rev 1472) @@ -1,4 +1,8 @@ -rich.colors <- function(n, palette="temperature", alpha=1, plot=FALSE) +rich.colors <- function(n, + palette="temperature", + alpha=1, + rgb=FALSE, + plot=FALSE) { if(n <= 0) return(character(0)) @@ -20,9 +24,13 @@ b[x>0.4] <- 1 } - rgb.m <- matrix(c(r,g,b), ncol=3, dimnames=list(NULL,c("red","green","blue"))) + rgb.m <- matrix(c(r,g,b), ncol=3, + dimnames=list(NULL,c("red","green","blue"))) col <- mapply(rgb, r, g, b, alpha) + if(rgb) + attr(col, "rgb") <- cbind(rgb.m, alpha) + if(plot) { opar <- par("fig", "plt") Modified: trunk/gplots/man/rich.colors.Rd =================================================================== --- trunk/gplots/man/rich.colors.Rd 2011-08-16 01:03:31 UTC (rev 1471) +++ trunk/gplots/man/rich.colors.Rd 2011-08-16 01:16:00 UTC (rev 1472) @@ -6,14 +6,17 @@ and in an order that is easy to interpret. } \usage{ -rich.colors(n, palette="temperature", rgb=FALSE, plot=FALSE) +rich.colors(n, palette="temperature", alpha=1.0, rgb=FALSE, plot=FALSE) } \arguments{ \item{n}{number of colors to generate.} \item{palette}{palette to use: \code{"temperature"} contains blue-green-yellow-red, and \code{"blues"} contains black-blue-white.} - \item{alpha}{alpha transparency, from 0 to 1.} + \item{alpha}{alpha transparency, from 0 (fully transparent) to 1 + (opaque).} + \item{rgb}{if ‘TRUE’ then a matrix of RGBA values is included as an + attribute.} \item{plot}{whether to plot a descriptive color diagram.} } \value{A character vector of color codes.} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-08-16 01:03:38
|
Revision: 1471 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1471&view=rev Author: warnes Date: 2011-08-16 01:03:31 +0000 (Tue, 16 Aug 2011) Log Message: ----------- Accellerate hist2d by replacing for() loop with tapply(), and allow user to specify summary function applied, per suggestion by Peter Hagedorn (PHA -at- santaris -dot- com). Modified Paths: -------------- trunk/gplots/R/hist2d.R trunk/gplots/man/hist2d.Rd Modified: trunk/gplots/R/hist2d.R =================================================================== --- trunk/gplots/R/hist2d.R 2011-05-02 14:02:34 UTC (rev 1470) +++ trunk/gplots/R/hist2d.R 2011-08-16 01:03:31 UTC (rev 1471) @@ -1,7 +1,16 @@ # $Id$ if(is.R()) -hist2d <- function( x,y=NULL, nbins=200, same.scale=FALSE, na.rm=TRUE, show=TRUE, col=c("black", heat.colors(12)), ... ) + + hist2d <- function(x, + y=NULL, + nbins=200, + same.scale=FALSE, + na.rm=TRUE, + show=TRUE, + col=c("black", heat.colors(12)), + FUN=base::length, + ... ) { if(is.null(y)) { @@ -34,18 +43,17 @@ y.cuts <- seq( from=min(y), to=max(y), length=nbins[2]+1, labels=FALSE) } - - index.x <- cut( x, x.cuts, include.lowest=TRUE) index.y <- cut( y, y.cuts, include.lowest=TRUE) - m <- matrix( 0, nrow=nbins[1], ncol=nbins[2], - dimnames=list( levels(index.x), - levels(index.y) ) ) + ## tapply is faster than old for() loop, and allows + ## use of any user-specified summary function + m <- tapply(x,list(index.x,index.y),FUN) - for( i in 1:length(index.x) ) - m[ index.x[i], index.y[i] ] <- m[ index.x[i], index.y[i] ] + 1 - + ## If we're using length, set empty cells to 0 instead of NA + if(identical(FUN,base::length)) + m[is.na(m)] <- 0 + xvals <- x.cuts[1:nbins[1]] yvals <- y.cuts[1:nbins[2]] @@ -54,9 +62,3 @@ invisible(list(counts=m,x=xvals,y=yvals)) } - - - - - - Modified: trunk/gplots/man/hist2d.Rd =================================================================== --- trunk/gplots/man/hist2d.Rd 2011-05-02 14:02:34 UTC (rev 1470) +++ trunk/gplots/man/hist2d.Rd 2011-08-16 01:03:31 UTC (rev 1471) @@ -27,9 +27,8 @@ } \usage{ hist2d(x,y=NULL, nbins=200, same.scale=FALSE, na.rm=TRUE, show=TRUE, - col=c("black", heat.colors(12)), ... ) + col=c("black", heat.colors(12)), FUN=base::length, ... ) } -%- maybe also `usage' for other objects documented here. \arguments{ \item{x}{either a vector containing the x coordinates or a matrix with 2 columns. } @@ -45,6 +44,10 @@ been computed. Defaults to TRUE.} \item{col}{ Colors for the histogram. Defaults to "black" for bins containing no elements, a set of 16 heat colors for other bins.} + \item{FUN}{Function used to summarize bin contents. Defaults to + \code{base::length}. Use, e.g., \code{mean} to calculate means for each bin + instead of counts. + } \item{\dots}{ Parameters passed to the image function. } } \details{ @@ -61,10 +64,8 @@ bin} \item{x}{lower x limit of each bin} \item{y}{lower y limit of each bin} -} -%\references{ ~put references to the literature/web site here ~ } + } \author{ Gregory R. Warnes \email{gr...@wa...}} -%\note{ ~~further notes~~ } \seealso{ \code{\link{image}}, \code{\link{persp}}, \code{\link{hist}} } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ar...@us...> - 2011-05-02 14:02:40
|
Revision: 1470 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1470&view=rev Author: arnima Date: 2011-05-02 14:02:34 +0000 (Mon, 02 May 2011) Log Message: ----------- Added argument 'alpha' and removed argument 'rgb' in rich.colors() Modified Paths: -------------- trunk/gplots/R/rich.colors.R trunk/gplots/man/rich.colors.Rd Modified: trunk/gplots/R/rich.colors.R =================================================================== --- trunk/gplots/R/rich.colors.R 2011-04-16 17:04:06 UTC (rev 1469) +++ trunk/gplots/R/rich.colors.R 2011-05-02 14:02:34 UTC (rev 1470) @@ -1,4 +1,4 @@ -rich.colors <- function(n, palette="temperature", rgb=FALSE, plot=FALSE) +rich.colors <- function(n, palette="temperature", alpha=1, plot=FALSE) { if(n <= 0) return(character(0)) @@ -20,14 +20,9 @@ b[x>0.4] <- 1 } - rgb.m <- matrix(c(r,g,b), ncol=3, - dimnames=list(as.character(seq(length=n)), - c("red","green","blue"))) - rich.vector <- apply(rgb.m, 1, function(v) rgb(v[1],v[2],v[3])) + rgb.m <- matrix(c(r,g,b), ncol=3, dimnames=list(NULL,c("red","green","blue"))) + col <- mapply(rgb, r, g, b, alpha) - if(rgb) - attr(rich.vector, "rgb") <- rgb.m - if(plot) { opar <- par("fig", "plt") @@ -40,10 +35,11 @@ axis(1, at=0:1) axis(2, at=0:1, las=1) par(fig=c(0,1,0.75,0.9), plt=c(0.08,0.97,0,1), new=TRUE) - midpoints <- barplot(rep(1,n), col=rich.vector, border=FALSE, space=FALSE, + midpoints <- barplot(rep(1,n), col=col, border=FALSE, space=FALSE, axes=FALSE) axis(1, at=midpoints, labels=1:n, lty=0, cex.axis=0.6) par(opar) } - return(rich.vector) + + return(col) } Modified: trunk/gplots/man/rich.colors.Rd =================================================================== --- trunk/gplots/man/rich.colors.Rd 2011-04-16 17:04:06 UTC (rev 1469) +++ trunk/gplots/man/rich.colors.Rd 2011-05-02 14:02:34 UTC (rev 1470) @@ -13,18 +13,16 @@ \item{palette}{palette to use: \code{"temperature"} contains blue-green-yellow-red, and \code{"blues"} contains black-blue-white.} - \item{rgb}{if \code{TRUE} then a matrix of RGB values is included as - an attribute.} - \item{plot}{if \code{TRUE} then a descriptive color diagram is plotted - on the current device.} + \item{alpha}{alpha transparency, from 0 to 1.} + \item{plot}{whether to plot a descriptive color diagram.} } \value{A character vector of color codes.} -\author{Arni Magnusson} +\author{Arni Magnusson.} \seealso{ \code{\link{rgb}}, \code{\link{rainbow}}, \code{\link{heat.colors}}. } \examples{ -m <- matrix(1:120+rnorm(120), nrow=15, ncol=8) +m <- abs(matrix(1:120+rnorm(120), nrow=15, ncol=8)) opar <- par(bg="gray", mfrow=c(1,2)) matplot(m, type="l", lty=1, lwd=3, col=rich.colors(8)) matplot(m, type="l", lty=1, lwd=3, col=rich.colors(8,"blues")) @@ -33,8 +31,11 @@ barplot(rep(1,100), col=rich.colors(100), space=0, border=0, axes=FALSE) barplot(rep(1,20), col=rich.colors(40)[11:30]) # choose subset -rich.colors(100, plot=TRUE, rgb=TRUE) # describe rgb recipe +plot(m, rev(m), ylim=c(120,0), pch=16, cex=2, + col=rich.colors(200,"blues",alpha=0.6)[1:120]) # semitransparent +rich.colors(100, plot=TRUE) # describe rgb recipe + par(mfrow=c(2,2)) barplot(m, col=heat.colors(15), main="\nheat.colors") barplot(m, col=1:15, main="\ndefault palette") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-04-16 17:04:12
|
Revision: 1469 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1469&view=rev Author: warnes Date: 2011-04-16 17:04:06 +0000 (Sat, 16 Apr 2011) Log Message: ----------- Update for release 2.8.2 Modified Paths: -------------- trunk/gdata/DESCRIPTION trunk/gdata/inst/NEWS Modified: trunk/gdata/DESCRIPTION =================================================================== --- trunk/gdata/DESCRIPTION 2011-04-15 20:25:24 UTC (rev 1468) +++ trunk/gdata/DESCRIPTION 2011-04-16 17:04:06 UTC (rev 1469) @@ -3,8 +3,8 @@ Description: Various R programming tools for data manipulation Depends: R (>= 2.6.0) Imports: gtools -Version: 2.8.1 -Date: 2010-11-12 +Version: 2.8.2 +Date: 2011-04-15 Author: Gregory R. Warnes, with contributions from Ben Bolker, Gregor Gorjanc, Gabor Grothendieck, Ales Korosec, Thomas Lumley, Don MacQueen, Arni Magnusson, Jim Rogers, and others Modified: trunk/gdata/inst/NEWS =================================================================== --- trunk/gdata/inst/NEWS 2011-04-15 20:25:24 UTC (rev 1468) +++ trunk/gdata/inst/NEWS 2011-04-16 17:04:06 UTC (rev 1469) @@ -1,5 +1,4 @@ - -CHANGES IN 2.?.? (2011-??-??) +CHANGES IN 2.8.1 (2011-04-15) ----------------------------- Enhancements: @@ -7,6 +6,11 @@ - nPairs() gains a summary method that shows how many times each variable is known, while the other variable of a pair is not +Bug fixes: + +- Fix errors on windows when R or Perl install path includes spaces by properly quoting the path. + + CHANGES IN 2.8.1 (2010-11-12) ----------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-04-15 20:25:30
|
Revision: 1468 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1468&view=rev Author: warnes Date: 2011-04-15 20:25:24 +0000 (Fri, 15 Apr 2011) Log Message: ----------- Fix errors on windows when R or Perl install path includes spaces by properly quoting the path. Modified Paths: -------------- trunk/gdata/R/installXLSXsupport.R trunk/gdata/R/read.xls.R trunk/gdata/R/sheetCount.R trunk/gdata/R/xls2sep.R Removed Paths: ------------- trunk/gdata/R/dQuote.ascii.R Deleted: trunk/gdata/R/dQuote.ascii.R =================================================================== --- trunk/gdata/R/dQuote.ascii.R 2011-04-15 19:43:55 UTC (rev 1467) +++ trunk/gdata/R/dQuote.ascii.R 2011-04-15 20:25:24 UTC (rev 1468) @@ -1,9 +0,0 @@ -## s$Id: read.xls.R 1342 2009-07-16 02:49:11Z warnes $ - -## Double quote string using *ASCII* double quotes. -## -## (The base 'dQuote' uses local-specific quotes (e.g UTF-8 quotes) -## which Unix command line doesn't like.) -## -dQuote.ascii <- function(x) paste('"',x,'"',sep='') - Modified: trunk/gdata/R/installXLSXsupport.R =================================================================== --- trunk/gdata/R/installXLSXsupport.R 2011-04-15 19:43:55 UTC (rev 1467) +++ trunk/gdata/R/installXLSXsupport.R 2011-04-15 20:25:24 UTC (rev 1468) @@ -24,7 +24,7 @@ ## ## execution command - cmd <- paste(perl, sc, sep=" ") + cmd <- paste(shQuote(perl), shQuote(sc), sep=" ") ## Modified: trunk/gdata/R/read.xls.R =================================================================== --- trunk/gdata/R/read.xls.R 2011-04-15 19:43:55 UTC (rev 1467) +++ trunk/gdata/R/read.xls.R 2011-04-15 20:25:24 UTC (rev 1468) @@ -33,7 +33,7 @@ if (missing(pattern)) { if(verbose) - cat("Reading", method, "file ", dQuote.ascii(tfn), "...\n") + cat("Reading", method, "file ", dQuote(tfn), "...\n") if(method=="csv") retval <- read.csv(con, ...) @@ -59,7 +59,7 @@ seek(con, 0) if(verbose) - cat("Reading", method, "file ", dQuote.ascii(tfn), "...\n") + cat("Reading", method, "file ", dQuote(tfn), "...\n") if(method=="csv") retval <- read.csv(con, skip = idx[1]-1, ...) Modified: trunk/gdata/R/sheetCount.R =================================================================== --- trunk/gdata/R/sheetCount.R 2011-04-15 19:43:55 UTC (rev 1467) +++ trunk/gdata/R/sheetCount.R 2011-04-15 20:25:24 UTC (rev 1468) @@ -29,8 +29,8 @@ tf <- paste(tempfile(), "xls", sep = ".") if(verbose) cat("Downloading", - dQuote.ascii(xls), " to ", - dQuote.ascii(tf), "...\n") + dQuote(xls), " to ", + dQuote(tf), "...\n") else cat("Downloading...\n") download.file(xls, tf, mode = "wb") @@ -47,7 +47,7 @@ ## ## execution command - cmd <- paste(perl, sc, dQuote.ascii(xls), sep=" ") + cmd <- paste(shQuote(perl), shQuote(sc), shQuote(xls), sep=" ") ## ## @@ -57,7 +57,7 @@ { cat("\n") cat("Extracting sheet information from\n") - cat(" ", dQuote.ascii(xls), "\n") + cat(" ", dQuote(xls), "\n") cat("... \n\n") } ## Modified: trunk/gdata/R/xls2sep.R =================================================================== --- trunk/gdata/R/xls2sep.R 2011-04-15 19:43:55 UTC (rev 1467) +++ trunk/gdata/R/xls2sep.R 2011-04-15 20:25:24 UTC (rev 1468) @@ -38,8 +38,8 @@ tf <- paste(tempfile(), "xls", sep = ".") if(verbose) cat("Downloading", - dQuote.ascii(xls), " to ", - dQuote.ascii(tf), "...\n") + dQuote(xls), " to ", + dQuote(tf), "...\n") download.file(xls, tf, mode = "wb") if(verbose) cat("Done.\n") xls <- tf @@ -70,11 +70,11 @@ ## ## execution command - cmd <- paste(dQuote.ascii(perl), - dQuote.ascii(script), - dQuote.ascii(xls), - dQuote.ascii(targetFile), - dQuote.ascii(sheet), + cmd <- paste(shQuote(perl), + shQuote(script), + shQuote(xls), + shQuote(targetFile), + shQuote(sheet), sep=" ") ## ## @@ -83,9 +83,9 @@ { cat("\n") cat("Converting xls file\n") - cat(" ", dQuote.ascii(xls), "\n") + cat(" ", dQuote(xls), "\n") cat("to", method, " file \n") - cat(" ", dQuote.ascii(targetFile), "\n") + cat(" ", dQuote(targetFile), "\n") cat("... \n\n") } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-04-15 19:44:01
|
Revision: 1467 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1467&view=rev Author: warnes Date: 2011-04-15 19:43:55 +0000 (Fri, 15 Apr 2011) Log Message: ----------- Fix error in xlsFormat() on windows when R or Perl install path includes spaces by quoting the path. Modified Paths: -------------- trunk/gdata/R/xlsFormats.R Modified: trunk/gdata/R/xlsFormats.R =================================================================== --- trunk/gdata/R/xlsFormats.R 2011-01-16 22:17:17 UTC (rev 1466) +++ trunk/gdata/R/xlsFormats.R 2011-04-15 19:43:55 UTC (rev 1467) @@ -24,7 +24,7 @@ ## ## execution command - cmd <- paste(perl, sc, sep=" ") + cmd <- paste(shQuote(perl), shQuote(sc), sep=" ") ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2011-01-16 22:17:24
|
Revision: 1466 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1466&view=rev Author: warnes Date: 2011-01-16 22:17:17 +0000 (Sun, 16 Jan 2011) Log Message: ----------- Fix warnings reported by R CMD check. Update version number to 2.15.1. Modified Paths: -------------- trunk/gmodels/DESCRIPTION trunk/gmodels/inst/NEWS trunk/gmodels/man/ci.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 Modified: trunk/gmodels/DESCRIPTION =================================================================== --- trunk/gmodels/DESCRIPTION 2011-01-15 21:58:56 UTC (rev 1465) +++ trunk/gmodels/DESCRIPTION 2011-01-16 22:17:17 UTC (rev 1466) @@ -1,5 +1,5 @@ Package: gmodels -Version: 2.15.0 +Version: 2.15.1 Title: Various R programming tools for model fitting Author: Gregory R. Warnes. Includes R source code and/or documentation contributed by Ben Bolker, Thomas Lumley, and Randall C @@ -7,10 +7,10 @@ (2005) SAIC-Frederick, Inc. Funded by the Intramural Research Program, of the NIH, National Cancer Institute, Center for Cancer Research under NCI Contract NO1-CO-12400. -Maintainer: Gregory R. Warnes <gr...@ra...> +Maintainer: Gregory R. Warnes <gr...@wa...> Description: Various R programming tools for model fitting Depends: R (>= 1.9.0) -Suggests: gplots, Matrix, nlme, lme4 +Suggests: gplots, gtools, Matrix, nlme, lme4 Imports: MASS, gdata License: GPL-2 URL: http://cran.r-project.org/src/contrib/PACKAGES.html Modified: trunk/gmodels/inst/NEWS =================================================================== --- trunk/gmodels/inst/NEWS 2011-01-15 21:58:56 UTC (rev 1465) +++ trunk/gmodels/inst/NEWS 2011-01-16 22:17:17 UTC (rev 1466) @@ -1,3 +1,11 @@ +Version 2.15.1 +-------------- + +Bug fixes: + +- Fix warnings reported by new versions of R CMD check. + + Version 2.15.0 -------------- Modified: trunk/gmodels/man/ci.Rd =================================================================== --- trunk/gmodels/man/ci.Rd 2011-01-15 21:58:56 UTC (rev 1465) +++ trunk/gmodels/man/ci.Rd 2011-01-16 22:17:17 UTC (rev 1466) @@ -30,9 +30,9 @@ removed. Defaults to \code{FALSE}.} \item{\dots}{Arguments for methods} \item{sim.mer}{Logical value. If TRUE confidence - intervals will be estimated using \code{\Link[Matrix]{mcmcsamp}}. This option only takes effect for mer + intervals will be estimated using \code{mcmcsamp}. This option only takes effect for mer objects.} - \item{n.sim}{Number of samples to take in \code{\Link[Matrix]{mcmcsamp}}.} + \item{n.sim}{Number of samples to take in \code{mcmcsamp}.} } %\details{ % ~~ If necessary, more details than the __description__ above ~~ @@ -42,7 +42,7 @@ \code{Estimate}, \code{CI lower}, \code{CI upper}, \code{Std. Error}, \code{DF} (for lme objects only), and \code{p-value}. } -\author{ Gregory R. Warnes \email{gr...@ra...} +\author{ Gregory R. Warnes \email{gr...@wa...} } \seealso{ \code{\link[stats]{confint}}, Modified: trunk/gmodels/man/estimable.Rd =================================================================== --- trunk/gmodels/man/estimable.Rd 2011-01-15 21:58:56 UTC (rev 1465) +++ trunk/gmodels/man/estimable.Rd 2011-01-16 22:17:17 UTC (rev 1466) @@ -38,10 +38,10 @@ included in the output table. Defaults to TRUE when beta0 is specified, FALSE otherwise.} \item{sim.mer}{Logical value. If TRUE p-values and confidence - intervals will be estimated using \code{\Link[Matrix]{mcmcsamp}}. + intervals will be estimated using \code{mcmcsamp}. } \item{n.sim}{Number of MCMC samples to take in - \code{\Link[Matrix]{mcmcsamp}}. + \code{mcmcsamp}. } \item{...}{ignored} } @@ -71,7 +71,7 @@ linear functions are meaningful. For computing contrasts among levels of a single factor, - \code{\link{fit.contrast}} may be more convenient. For computing + \code{fit.contrast} may be more convenient. For computing contrasts between two specific combinations of model parameters, the \code{contrast} function in Frank Harrell's Design library may be more convenient. @@ -95,13 +95,14 @@ } \author{ BXC (Bendix Carstensen) \email{bxc\@novonordisk.com}, - Gregory R. Warnes \email{gr...@ra...}, + Gregory R. Warnes \email{gr...@wa...}, Soren Hojsgaard \email{so...@ag...}, and Randall C Johnson \email{rjo...@nc...} } \seealso{ \code{\link{fit.contrast}}, - \code{\link[stats]{lm}}, \code{\link[nlme]{lme}}, + \code{\link[stats]{lm}}, + \code{\link[nlme]{lme}}, \code{\link[stats]{contrasts}}, \code{\link[Design]{contrast}}, } Modified: trunk/gmodels/man/fast.prcomp.Rd =================================================================== --- trunk/gmodels/man/fast.prcomp.Rd 2011-01-15 21:58:56 UTC (rev 1465) +++ trunk/gmodels/man/fast.prcomp.Rd 2011-01-16 22:17:17 UTC (rev 1466) @@ -69,7 +69,7 @@ \code{\link{svd}} . } \author{Modifications by Gregory R. Warnes - \email{gr...@ra...} } + \email{gr...@wa...} } \seealso{ \code{\link[stats]{prcomp}}, \code{\link{svd}}, \code{\link{La.svd}} Modified: trunk/gmodels/man/fit.contrast.Rd =================================================================== --- trunk/gmodels/man/fit.contrast.Rd 2011-01-15 21:58:56 UTC (rev 1465) +++ trunk/gmodels/man/fit.contrast.Rd 2011-01-16 22:17:17 UTC (rev 1466) @@ -35,9 +35,9 @@ degrees of freedom.} \item{\dots}{optional arguments provided by methods.} \item{sim.mer}{Logical value. If TRUE p-values and confidence - intervals will be estimated using \code{\Link[Matrix]{mcmcsamp}}. This option only takes effect for mer + intervals will be estimated using \code{mcmcsamp}. This option only takes effect for mer objects.} - \item{n.sim}{Number of samples to use in \code{\Link[Matrix]{mcmcsamp}}.} + \item{n.sim}{Number of samples to use in \code{mcmcsamp}.} } \details{ @@ -52,7 +52,7 @@ specified lower and upper confidence limits are also returned.} \references{Venables & Ripley, Section 6.2} -\author{ Gregory R. Warnes \email{gr...@ra...}} +\author{ Gregory R. Warnes \email{gr...@wa...}} \seealso{ \code{\link{lm}}, \code{\link{contrasts}}, \code{\link{contr.treatment}}, \code{\link{contr.poly}}, Modified: trunk/gmodels/man/glh.test.Rd =================================================================== --- trunk/gmodels/man/glh.test.Rd 2011-01-15 21:58:56 UTC (rev 1465) +++ trunk/gmodels/man/glh.test.Rd 2011-01-16 22:17:17 UTC (rev 1466) @@ -65,7 +65,7 @@ } \references{ R.H. Myers, Classical and Modern Regression with Applications, 2nd Ed, 1990, p. 105} -\author{Gregory R. Warnes \email{gr...@ra...} } +\author{Gregory R. Warnes \email{gr...@wa...} } \seealso{\code{\link{fit.contrast}}, \code{\link{estimable}}, \code{\link{contrasts}} } \examples{ Modified: trunk/gmodels/man/make.contrasts.Rd =================================================================== --- trunk/gmodels/man/make.contrasts.Rd 2011-01-15 21:58:56 UTC (rev 1465) +++ trunk/gmodels/man/make.contrasts.Rd 2011-01-16 22:17:17 UTC (rev 1466) @@ -31,7 +31,7 @@ \code{\link{contrasts}} or to the \code{contrasts} argument of model functions (eg, \code{\link{lm}}). } -\author{ Gregory R. Warnes \email{gr...@ra...}} +\author{ Gregory R. Warnes \email{gr...@wa...}} \seealso{ \code{\link{lm}}, \code{\link{contrasts}}, \code{\link{contr.treatment}}, \code{\link{contr.poly}}, Computation and testing of General Linear Hypothesis: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gg...@us...> - 2011-01-15 21:59:02
|
Revision: 1465 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1465&view=rev Author: ggorjan Date: 2011-01-15 21:58:56 +0000 (Sat, 15 Jan 2011) Log Message: ----------- Adding summary method for nPairs Modified Paths: -------------- trunk/gdata/NAMESPACE trunk/gdata/R/nPairs.R trunk/gdata/inst/NEWS trunk/gdata/inst/unitTests/runit.nPairs.R trunk/gdata/man/nPairs.Rd Modified: trunk/gdata/NAMESPACE =================================================================== --- trunk/gdata/NAMESPACE 2011-01-06 19:33:26 UTC (rev 1464) +++ trunk/gdata/NAMESPACE 2011-01-15 21:58:56 UTC (rev 1465) @@ -62,6 +62,8 @@ S3method(reorder, factor) +S3method(summary, nPairs) + ## drop.levels stuff S3method(drop.levels, default) S3method(drop.levels, factor) Modified: trunk/gdata/R/nPairs.R =================================================================== --- trunk/gdata/R/nPairs.R 2011-01-06 19:33:26 UTC (rev 1464) +++ trunk/gdata/R/nPairs.R 2011-01-15 21:58:56 UTC (rev 1465) @@ -42,8 +42,22 @@ colnames(ret) <- tmp } } + class(ret) <- c("nPairs", class(ret)) ret } +summary.nPairs <- function(object, ...) +{ + n <- nrow(object) + ret <- matrix(data=0, nrow=n, ncol=n) + for(i in 1:n) { + tmp <- 1:n + tmp <- tmp[!(tmp == i)] + ret[i, tmp] <- object[i, i] - object[i, tmp] + } + dimnames(ret) <- dimnames(object) + ret +} + ###------------------------------------------------------------------------ ### nPairs.R ends here Modified: trunk/gdata/inst/NEWS =================================================================== --- trunk/gdata/inst/NEWS 2011-01-06 19:33:26 UTC (rev 1464) +++ trunk/gdata/inst/NEWS 2011-01-15 21:58:56 UTC (rev 1465) @@ -1,3 +1,12 @@ + +CHANGES IN 2.?.? (2011-??-??) +----------------------------- + +Enhancements: + +- nPairs() gains a summary method that shows how many times each variable + is known, while the other variable of a pair is not + CHANGES IN 2.8.1 (2010-11-12) ----------------------------- Modified: trunk/gdata/inst/unitTests/runit.nPairs.R =================================================================== --- trunk/gdata/inst/unitTests/runit.nPairs.R 2011-01-06 19:33:26 UTC (rev 1464) +++ trunk/gdata/inst/unitTests/runit.nPairs.R 2011-01-15 21:58:56 UTC (rev 1465) @@ -26,11 +26,12 @@ 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)), + testCheck <- matrix(data=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) + class(testCheck) <- c("nPairs", class(testCheck)) testCheckNames <- testCheck colnames(testCheckNames) <- rownames(testCheckNames) <- colnames(test) @@ -41,10 +42,21 @@ checkIdentical(nPairs(x=as.matrix(test), names=FALSE), testCheck) testCheck <- cbind(testCheckNames, as.integer(c(5, 4, 0, 0))) + class(testCheck) <- class(testCheckNames) colnames(testCheck) <- c(colnames(test), "all") checkIdentical(nPairs(x=test, margin=TRUE), testCheck) + + testCheckSumm <- matrix(data=as.integer(c(0, 1, 4, 2, + 0, 0, 4, 2, + 0, 1, 0, 0, + 0, 1, 2, 0)), + nrow=4, ncol=4, byrow=TRUE) + dimnames(testCheckSumm) <- dimnames(testCheckNames) + tmp <- summary(nPairs(x=test)) + checkEquals(tmp, testCheckSumm) } + ### }}} ### {{{ Dear Emacs ### Local variables: Modified: trunk/gdata/man/nPairs.Rd =================================================================== --- trunk/gdata/man/nPairs.Rd 2011-01-06 19:33:26 UTC (rev 1464) +++ trunk/gdata/man/nPairs.Rd 2011-01-15 21:58:56 UTC (rev 1465) @@ -31,6 +31,14 @@ \item{\dots}{other arguments passed to \code{\link{abbreviate}}} } +\details{ + +The class of returned matrix is nPairs and matrix. There is a summary method, +which shows the opposite information - counts how many times each variable is +known, while the other variable of a pair is not. See examples. + +} + \value{ Matrix of order \eqn{k}, where \eqn{k} is the number of columns in \code{x}. @@ -65,6 +73,8 @@ ## Margin nPairs(x=test, margin=TRUE) +## Summary +summary(object=nPairs(x=test)) } \keyword{misc} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2010-12-13 16:44:24
|
Revision: 1463 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1463&view=rev Author: warnes Date: 2010-12-13 16:44:17 +0000 (Mon, 13 Dec 2010) Log Message: ----------- Correct error that arises when data includes NA values, identified by Melissa Key Modified Paths: -------------- trunk/gplots/R/heatmap.2.R Modified: trunk/gplots/R/heatmap.2.R =================================================================== --- trunk/gplots/R/heatmap.2.R 2010-11-12 19:14:06 UTC (rev 1462) +++ trunk/gplots/R/heatmap.2.R 2010-12-13 16:44:17 UTC (rev 1463) @@ -493,8 +493,8 @@ { 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)) + tmpbreaks[1] <- -max(abs(x), na.rm=TRUE) + tmpbreaks[length(tmpbreaks)] <- max(abs(x), na.rm=TRUE) } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2010-11-12 19:14:12
|
Revision: 1462 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1462&view=rev Author: warnes Date: 2010-11-12 19:14:06 +0000 (Fri, 12 Nov 2010) Log Message: ----------- Update NEWS for gdata 2.8.1 Modified Paths: -------------- trunk/gdata/inst/NEWS Modified: trunk/gdata/inst/NEWS =================================================================== --- trunk/gdata/inst/NEWS 2010-11-12 19:09:00 UTC (rev 1461) +++ trunk/gdata/inst/NEWS 2010-11-12 19:14:06 UTC (rev 1462) @@ -1,3 +1,19 @@ +CHANGES IN 2.8.1 (2010-11-12) +----------------------------- + +Enhancements: + +- Minor improvement to Args(), read.xls() man page. + +Bug fixes: + +- Modify write.fwf() to capture and pass on additional arguments for + write.table(). This resolves a bug reported by Jan Wijffels. + +- Modify xls2sep.R to avoid use of file.access() which is unreliable + on Windows network shares. + + CHANGES IN 2.8.0 (2010-04-03) ----------------------------- @@ -15,9 +31,9 @@ installXLSXsupport() function to attempt to install the necessary perl libraries. -- The function function installXLSXsupport() has been provided to - install the binary perl modules that read.xls needs to support Excel - 2007+ 'XLSX' files. +- The function installXLSXsupport() has been provided to install the + binary perl modules that read.xls needs to support Excel 2007+ + 'XLSX' files. CHANGES IN 2.7.3 (2010-04-02) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2010-11-12 19:09:06
|
Revision: 1461 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1461&view=rev Author: warnes Date: 2010-11-12 19:09:00 +0000 (Fri, 12 Nov 2010) Log Message: ----------- Update DEScription file for 2.8.1 release Modified Paths: -------------- trunk/gdata/DESCRIPTION Modified: trunk/gdata/DESCRIPTION =================================================================== --- trunk/gdata/DESCRIPTION 2010-11-12 19:08:39 UTC (rev 1460) +++ trunk/gdata/DESCRIPTION 2010-11-12 19:09:00 UTC (rev 1461) @@ -3,8 +3,8 @@ Description: Various R programming tools for data manipulation Depends: R (>= 2.6.0) Imports: gtools -Version: 2.8.0 -Date: 2010-04-03 +Version: 2.8.1 +Date: 2010-11-12 Author: Gregory R. Warnes, with contributions from Ben Bolker, Gregor Gorjanc, Gabor Grothendieck, Ales Korosec, Thomas Lumley, Don MacQueen, Arni Magnusson, Jim Rogers, and others This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2010-11-12 19:08:45
|
Revision: 1460 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1460&view=rev Author: warnes Date: 2010-11-12 19:08:39 +0000 (Fri, 12 Nov 2010) Log Message: ----------- Update test output to match latest code Modified Paths: -------------- trunk/gdata/tests/test.read.xls.Rout.save trunk/gdata/tests/tests.write.fwf.Rout.save Modified: trunk/gdata/tests/test.read.xls.Rout.save =================================================================== --- trunk/gdata/tests/test.read.xls.Rout.save 2010-11-12 19:08:12 UTC (rev 1459) +++ trunk/gdata/tests/test.read.xls.Rout.save 2010-11-12 19:08:39 UTC (rev 1460) @@ -1,14 +1,13 @@ -R version 2.11.0 (2010-04-22) +R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 +Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. - Natural language support but running in an English locale - R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. @@ -18,7 +17,10 @@ Type 'q()' to quit R. > library(gdata) +gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED. +gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED. + Attaching package: 'gdata' The following object(s) are masked from 'package:utils': @@ -26,14 +28,15 @@ object.size > +> if ( ! 'XLSX' %in% xlsFormats() ) ++ { ++ try( installXLSXModules() ) ++ } > > # iris.xls is included in the gregmisc package for use as an example > xlsfile <- file.path(.path.package('gdata'),'xls','iris.xls') > > iris.1 <- read.xls(xlsfile) # defaults to csv format -WARNING: Perl module Compress::Raw::Zlib cannot be loaded. -WARNING: Perl module Spreadsheet::XLSX cannot be loaded. -WARNING: Microsoft Excel 2007 'XLSX' formatted files will not be processed. > iris.1 Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa @@ -188,9 +191,6 @@ 150 5.9 3.0 5.1 1.8 virginica > > iris.2 <- read.xls(xlsfile,method="csv") # specify csv format -WARNING: Perl module Compress::Raw::Zlib cannot be loaded. -WARNING: Perl module Spreadsheet::XLSX cannot be loaded. -WARNING: Microsoft Excel 2007 'XLSX' formatted files will not be processed. > iris.2 Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa @@ -345,9 +345,6 @@ 150 5.9 3.0 5.1 1.8 virginica > > iris.3 <- read.xls(xlsfile,method="tab") # specify tab format -WARNING: Perl module Compress::Raw::Zlib cannot be loaded. -WARNING: Perl module Spreadsheet::XLSX cannot be loaded. -WARNING: Microsoft Excel 2007 'XLSX' formatted files will not be processed. > iris.3 Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa @@ -512,28 +509,22 @@ > > # see the number and names of sheets: > sheetCount(exampleFile) -WARNING: Perl module Compress::Raw::Zlib cannot be loaded. -WARNING: Perl module Spreadsheet::XLSX cannot be loaded. -WARNING: Microsoft Excel 2007 'XLSX' formatted files will not be processed. [1] 4 > > if( 'XLSX' %in% xlsFormats() ) + sheetCount(exampleFile2007) +[1] 4 > > sheetNames(exampleFile) -WARNING: Perl module Compress::Raw::Zlib cannot be loaded. -WARNING: Perl module Spreadsheet::XLSX cannot be loaded. -WARNING: Microsoft Excel 2007 'XLSX' formatted files will not be processed. [1] "Sheet First" "Sheet Second" [3] "Sheet with a very long name!" "Sheet with initial text" > > if( 'XLSX' %in% xlsFormats() ) + sheetNames(exampleFile2007) +[1] "Sheet First" "Sheet Second" +[3] "Sheet with a very long name!" "Sheet with initial text" > > example.1 <- read.xls(exampleFile, sheet=1) # default is first worksheet -WARNING: Perl module Compress::Raw::Zlib cannot be loaded. -WARNING: Perl module Spreadsheet::XLSX cannot be loaded. -WARNING: Microsoft Excel 2007 'XLSX' formatted files will not be processed. > example.1 A B C 1 1 1 1 @@ -545,9 +536,6 @@ 7 7 49 343 > > example.2 <- read.xls(exampleFile, sheet=2) # second worksheet by number -WARNING: Perl module Compress::Raw::Zlib cannot be loaded. -WARNING: Perl module Spreadsheet::XLSX cannot be loaded. -WARNING: Microsoft Excel 2007 'XLSX' formatted files will not be processed. > example.2 X D E F G Factor 1 FirstRow 1 NA NA NA Red @@ -556,9 +544,6 @@ 4 FourthRow 4 3 2 1 Black > > example.3 <- read.xls(exampleFile, sheet=3) # second worksheet by number -WARNING: Perl module Compress::Raw::Zlib cannot be loaded. -WARNING: Perl module Spreadsheet::XLSX cannot be loaded. -WARNING: Microsoft Excel 2007 'XLSX' formatted files will not be processed. > example.3 X1 X2001.01.01 X1.01 X0.205818150587141 X.DIV.0. A 1 2 2002-02-02 2:02 0.2910708 NA B @@ -572,9 +557,6 @@ 9 10 2010-10-10 10:10 0.6508541 0.0000000 A > > example.4 <- read.xls(exampleFile, sheet=3) # second worksheet by number -WARNING: Perl module Compress::Raw::Zlib cannot be loaded. -WARNING: Perl module Spreadsheet::XLSX cannot be loaded. -WARNING: Microsoft Excel 2007 'XLSX' formatted files will not be processed. > example.4 X1 X2001.01.01 X1.01 X0.205818150587141 X.DIV.0. A 1 2 2002-02-02 2:02 0.2910708 NA B @@ -608,7 +590,47 @@ + data <- read.xls(exampleFile2007, sheet="Sheet with initial text", skip=2) + print(data) + } + A B C +1 1 1 1 +2 2 4 8 +3 3 9 27 +4 4 16 64 +5 5 25 125 +6 6 36 216 +7 7 49 343 + X D E F G Factor +1 FirstRow 1 NA NA NA Red +2 SecondRow 2 1 NA NA Green +3 ThirdRow 3 2 1 NA Red +4 FourthRow 4 3 2 1 Black + X1 X2001.01.01 X1.01 X0.205818150587141 X.DIV.0. A +1 2 2002-02-02 2:02 0.2910708 NA B +2 3 2003-03-03 3:03 0.3564875 -0.8414710 C +3 4 2004-04-04 4:04 0.4116363 0.7080734 +4 5 2005-05-05 5:05 0.4602234 0.5013680 A +5 6 2006-06-06 6:06 NA 0.2513698 B +6 7 2007-07-07 7:07 0.5445436 0.0631868 B +7 8 2008-08-08 8:08 0.5821416 NA C +8 9 2009-09-09 9:09 0.6174545 0.0000000 A +9 10 2010-10-10 10:10 0.6508541 0.0000000 A + X1 X2001.01.01 X1.01 X0.205818150587141 X.DIV.0. A +1 2 2002-02-02 2:02 0.2910708 NA B +2 3 2003-03-03 3:03 0.3564875 -0.8414710 C +3 4 2004-04-04 4:04 0.4116363 0.7080734 +4 5 2005-05-05 5:05 0.4602234 0.5013680 A +5 6 2006-06-06 6:06 NA 0.2513698 B +6 7 2007-07-07 7:07 0.5445436 0.0631868 B +7 8 2008-08-08 8:08 0.5821416 NA C +8 9 2009-09-09 9:09 0.6174545 0.0000000 A +9 10 2010-10-10 10:10 0.6508541 0.0000000 A + X D E F G Factor +1 FirstRow 1 NA NA NA Red +2 SecondRow 2 1 NA NA Green +3 ThirdRow 3 2 1 NA Red +4 FourthRow 4 3 2 1 Black + X X.1 D E F G Factor +1 NA FirstRow 1 NA NA NA Red +2 NA SecondRow 2 1 NA NA Green +3 NA ThirdRow 3 2 1 NA Red +4 NA FourthRow 4 3 2 1 Black > -> proc.time() - user system elapsed - 1.350 0.285 1.659 Modified: trunk/gdata/tests/tests.write.fwf.Rout.save =================================================================== --- trunk/gdata/tests/tests.write.fwf.Rout.save 2010-11-12 19:08:12 UTC (rev 1459) +++ trunk/gdata/tests/tests.write.fwf.Rout.save 2010-11-12 19:08:39 UTC (rev 1460) @@ -1,7 +1,8 @@ -R version 2.9.0 (2009-04-17) -Copyright (C) 2009 The R Foundation for Statistical Computing +R version 2.12.0 (2010-10-15) +Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 +Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -23,14 +24,16 @@ > ###------------------------------------------------------------------------ > > library(gdata) +gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED. +gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED. + Attaching package: 'gdata' +The following object(s) are masked from 'package:utils': -The following object(s) are masked from package:utils : + object.size - object.size - > > ## --- Test data --- > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wa...@us...> - 2010-11-12 19:08:23
|
Revision: 1459 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1459&view=rev Author: warnes Date: 2010-11-12 19:08:12 +0000 (Fri, 12 Nov 2010) Log Message: ----------- Modify write.fwf() to capture and pass on additional arguments for write.table(). This resolves a bug reported by Jan Wijffels. Modified Paths: -------------- trunk/gdata/R/write.fwf.R trunk/gdata/man/write.fwf.Rd Added Paths: ----------- trunk/gdata/tests/test.write.fwf.eol.R Modified: trunk/gdata/R/write.fwf.R =================================================================== --- trunk/gdata/R/write.fwf.R 2010-11-12 02:59:29 UTC (rev 1458) +++ trunk/gdata/R/write.fwf.R 2010-11-12 19:08:12 UTC (rev 1459) @@ -5,10 +5,22 @@ ### Time-stamp: <2008-08-05 12:11:27 ggorjan> ###------------------------------------------------------------------------ -write.fwf <- function(x, file="", append=FALSE, quote=FALSE, sep=" ", - na="", rownames=FALSE, colnames=TRUE, rowCol=NULL, - justify="left", formatInfo=FALSE, quoteInfo=TRUE, - width=NULL, ...) +write.fwf <- function(x, + file="", + append=FALSE, + quote=FALSE, + sep=" ", + na="", + rownames=FALSE, + colnames=TRUE, + rowCol=NULL, + justify="left", + formatInfo=FALSE, + quoteInfo=TRUE, + width=NULL, + eol="\n", + qmethod=c("escape", "double"), + ...) { ## --- Setup --- @@ -137,12 +149,28 @@ if(colnames) { if(rownames && is.null(rowCol)) colnamesMy <- colnamesMy[-1] - write.table(t(as.matrix(colnamesMy)), file=file, append=append, - quote=quote, sep=sep, row.names=FALSE, col.names=FALSE, ...) - } + write.table(t(as.matrix(colnamesMy)), + file=file, + append=append, + quote=quote, + sep=sep, + eol=eol, + na=na, + row.names=FALSE, + col.names=FALSE, + qmethod=qmethod) + } - write.table(x=x, file=file, append=(colnames || append), quote=quote, - sep=sep, row.names=FALSE, col.names=FALSE, ...) + write.table(x=x, + file=file, + append=(colnames || append), + quote=quote, + sep=sep, + eol=eol, + na=na, + row.names=FALSE, + col.names=FALSE, + qmethod=qmethod) ## --- Return format and fixed width information --- Modified: trunk/gdata/man/write.fwf.Rd =================================================================== --- trunk/gdata/man/write.fwf.Rd 2010-11-12 02:59:29 UTC (rev 1458) +++ trunk/gdata/man/write.fwf.Rd 2010-11-12 19:08:12 UTC (rev 1459) @@ -22,7 +22,8 @@ write.fwf(x, file="", append=FALSE, quote=FALSE, sep=" ", na="", rownames=FALSE, colnames=TRUE, rowCol=NULL, justify="left", - formatInfo=FALSE, quoteInfo=TRUE, width=NULL, \dots) + formatInfo=FALSE, quoteInfo=TRUE, width=NULL, eol="\n", + qmethod=c("escape", "double"), \dots) } @@ -44,8 +45,18 @@ widths and format} \item{quoteInfo}{logical, should \code{formatInfo} account for quotes} \item{width}{numeric, width of the columns in the output} - \item{\dots}{further arguments to \code{\link{format.info}}, - \code{\link{format}} and \code{\link{write.table}}} + \item{eol}{the character(s) to print at the end of each line (row). + For example, 'eol="\\r\\n"' will produce Windows' line endings on a + Unix-alike OS, and 'eol="\\r"' will produce files as expected by Mac + OS Excel 2004.} + \item{qmethod}{a character string specifying how to deal with embedded + double quote characters when quoting strings. Must be one of + '"escape"' (default), in which case the quote character is + escaped in C style by a backslash, or '"double"', in which + case it is doubled. You can specify just the initial letter.} + \item{\dots}{further arguments to + \code{\link{format.info}} and \code{\link{format}} + } } \details{ Added: trunk/gdata/tests/test.write.fwf.eol.R =================================================================== --- trunk/gdata/tests/test.write.fwf.eol.R (rev 0) +++ trunk/gdata/tests/test.write.fwf.eol.R 2010-11-12 19:08:12 UTC (rev 1459) @@ -0,0 +1,5 @@ +library(gdata) +saveto <- tempfile(pattern = "test.txt", tmpdir = tempdir()) + +write.fwf(x = data.frame(a=1:length(LETTERS), b=LETTERS), + file=saveto, eol="\r\n") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |