[R-gregmisc-users] SF.net SVN: r-gregmisc:[1762] trunk/gtools
Brought to you by:
warnes
From: <wa...@us...> - 2014-01-11 23:24:23
|
Revision: 1762 http://sourceforge.net/p/r-gregmisc/code/1762 Author: warnes Date: 2014-01-11 23:24:20 +0000 (Sat, 11 Jan 2014) Log Message: ----------- Fixes for gtools release 3.2.0 Modified Paths: -------------- trunk/gtools/DESCRIPTION trunk/gtools/NAMESPACE trunk/gtools/R/keywords.R trunk/gtools/man/gtools-defunct.Rd trunk/gtools/man/stars.pval.Rd Added Paths: ----------- trunk/gtools/R/defunct.R Removed Paths: ------------- trunk/gtools/R/capture.R trunk/gtools/man/capture.Rd Modified: trunk/gtools/DESCRIPTION =================================================================== --- trunk/gtools/DESCRIPTION 2013-12-23 18:48:15 UTC (rev 1761) +++ trunk/gtools/DESCRIPTION 2014-01-11 23:24:20 UTC (rev 1762) @@ -1,9 +1,10 @@ Package: gtools Title: Various R programming tools Description: Various R programming tools -Version: 3.1.1 -Date: 2013-11-06 +Version: 3.2.0 +Date: 2014-01-11 Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley Maintainer: Gregory R. Warnes <gr...@wa...> +Imports: gdata License: LGPL-2.1 Modified: trunk/gtools/NAMESPACE =================================================================== --- trunk/gtools/NAMESPACE 2013-12-23 18:48:15 UTC (rev 1761) +++ trunk/gtools/NAMESPACE 2014-01-11 23:24:20 UTC (rev 1762) @@ -34,4 +34,3 @@ stars.pval, strmacro ) - Deleted: trunk/gtools/R/capture.R =================================================================== --- trunk/gtools/R/capture.R 2013-12-23 18:48:15 UTC (rev 1761) +++ trunk/gtools/R/capture.R 2014-01-11 23:24:20 UTC (rev 1762) @@ -1,44 +0,0 @@ -# $Id$ -# -# $Log$ -# Revision 1.4 2004/01/21 04:31:25 warnes -# - 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. -# -# Revision 1.3 2003/11/10 22:11:13 warnes -# -# - Add files contributed by Arni Magnusson -# <arnima@u.washington.edu>. As well as some of my own. -# -# Revision 1.2 2003/04/04 13:45:21 warnes -# -# - Allow optional arguments to sprint to be passed to print -# -# Revision 1.1 2003/04/02 22:28:32 warnes -# -# - Added file 'capture.R' containing capture() and sprint(). -# -# - -capture <- function( expression, collapse="\n") - { - .Deprecated("capture.output", "base", ) - - resultText <- capture.output( expression ) - - return( paste( c(resultText, ""), collapse=collapse, sep="" ) ) - # the reason for c(result, "") is so that we get the line - # terminator on the last line of output. Otherwise, it just shows - # up between the lines. - } - - -sprint <- function(x,...) - { - .Deprecated("capture.output", "base") - capture(print(x,...)) - } Copied: trunk/gtools/R/defunct.R (from rev 1761, trunk/gtools/R/capture.R) =================================================================== --- trunk/gtools/R/defunct.R (rev 0) +++ trunk/gtools/R/defunct.R 2014-01-11 23:24:20 UTC (rev 1762) @@ -0,0 +1,6 @@ +capture <- function( expression, collapse="\n") + .Defunct("capture.output", "base") + +sprint <- function(x,...) + .Defunct("capture.output", "base") + Modified: trunk/gtools/R/keywords.R =================================================================== --- trunk/gtools/R/keywords.R 2013-12-23 18:48:15 UTC (rev 1761) +++ trunk/gtools/R/keywords.R 2014-01-11 23:24:20 UTC (rev 1762) @@ -8,6 +8,15 @@ } else { + + ## Local copy of trim.character to avoid cyclic dependency with gdata ## + trim <- function(s) + { + s <- sub(pattern="^[[:blank:]]+", replacement="", x=s) + s <- sub(pattern="[[:blank:]]+$", replacement="", x=s) + s + } + kw <- scan(file=file, what=character(), sep="\n", quiet=TRUE) kw <- grep("&", kw, value=TRUE) kw <- gsub("&[^&]*$","", kw) Deleted: trunk/gtools/man/capture.Rd =================================================================== --- trunk/gtools/man/capture.Rd 2013-12-23 18:48:15 UTC (rev 1761) +++ trunk/gtools/man/capture.Rd 2014-01-11 23:24:20 UTC (rev 1762) @@ -1,51 +0,0 @@ -\name{capture} -\alias{capture} -\alias{sprint} -\title{Capture printed output of an R expression in a string} -\description{ -Capture printed output of an R expression in a string -} -\usage{ -capture(expression, collapse = "\n") -sprint(x,...) -} -\arguments{ - \item{expression}{R expression whose output will be captured.} - \item{collapse}{Character used to join output lines. Defaults to - "\\n". Use \code{NULL} to return a vector of individual output lines.} - \item{x}{Object to be printed} - \item{...}{Optional parameters to be passed to \code{\link{print}} } -} -\details{ - The \code{capture} function uses \code{\link{sink}} to capture the - printed results generated by \code{expression}. - - The function \code{sprint} uses \code{capture} to redirect the - results of calling \code{\link{print}} on an object to a string. -} -\value{ - A character string, or if \code{collapse==NULL} a vector of character - strings containing the printed output from the R expression. -} -\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{gr...@wa...} } -\seealso{ - \code{\link[session]{texteval}}, - \code{\link{capture.output}} -} -\examples{ - -# capture the results of a loop -loop.text <- capture( for(i in 1:10) cat("i=",i,"\n") ) -loop.text - -# put regression summary results into a string -data(iris) -reg <- lm( Sepal.Length ~ Species, data=iris ) -summary.text <- sprint( summary(reg) ) -cat(summary.text) -} -\keyword{print} -\keyword{IO} Modified: trunk/gtools/man/gtools-defunct.Rd =================================================================== --- trunk/gtools/man/gtools-defunct.Rd 2013-12-23 18:48:15 UTC (rev 1761) +++ trunk/gtools/man/gtools-defunct.Rd 2014-01-11 23:24:20 UTC (rev 1762) @@ -2,29 +2,34 @@ \alias{gtools-defunct} \alias{assert} \alias{addLast} -\title{Deprecated Functions in the gtools package} +\title{Defunct Functions in package \code{gtools}} \description{ - These functions are no longer available in gtools. + The functions or variables listed here are no longer part of + package \code{gtools}. } \usage{ assert(FLAG) addLast(fun) +capture( } -\arguments{ - \item{FLAG}{ Expression that should evaluate to a boolean vector} - \item{fun}{Function to be called.} -} +%\arguments{ +% \item{FLAG}{ Expression that should evaluate to a boolean vector} +% \item{fun}{Function to be called.} +%} \details{ \itemize{ \item{ \code{assert} is a defunct synonym for - \code{\link[base]{stopifnot}}. } + \code{\link[base]{stopifnot}}. } \item{ \code{addLast} has been replaced by \code{lastAdd}, which has - the same purpose but appled using different syntax. } + the same purpose but appled using different syntax. } + \item{ \code{capture} and \code{capture.output} have been removed in + favor of \code{capture.output} from the \code{base} package.} } } \seealso{ - \code{\link[base]{Defunct}} - \code{\link[base]{stopifnot}} - \code{\link[gtools]{lastAdd}} + \code{\link[base]{Defunct}}, + \code{\link[base]{stopifnot}}, + \code{\link[gtools]{lastAdd}}, + \code{\link[base]{capture.output} } \keyword{misc} Modified: trunk/gtools/man/stars.pval.Rd =================================================================== --- trunk/gtools/man/stars.pval.Rd 2013-12-23 18:48:15 UTC (rev 1761) +++ trunk/gtools/man/stars.pval.Rd 2014-01-11 23:24:20 UTC (rev 1762) @@ -36,9 +36,7 @@ } \examples{ p.val <- c(0.0004, 0.0015, 0.013, 0.044, 0.067, 0.24) -stars.pval(x) +stars.pval(p.val) } -% Add one or more standard keywords, see file 'KEYWORDS' in the -% R documentation directory. \keyword{misc} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |