Thread: [R-gregmisc-users] SF.net SVN: r-gregmisc:[1303] trunk/gtools
Brought to you by:
warnes
|
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...> - 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-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:26:35
|
Revision: 1327
http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1327&view=rev
Author: warnes
Date: 2009-05-09 03:26:19 +0000 (Sat, 09 May 2009)
Log Message:
-----------
Update NEWS and create softlinks for NEWS and ChangeLog in top level directory
Modified Paths:
--------------
trunk/gtools/inst/NEWS
Added Paths:
-----------
trunk/gtools/ChangeLog
trunk/gtools/NEWS
Added: trunk/gtools/ChangeLog
===================================================================
--- trunk/gtools/ChangeLog (rev 0)
+++ trunk/gtools/ChangeLog 2009-05-09 03:26:19 UTC (rev 1327)
@@ -0,0 +1 @@
+link inst/ChangeLog
\ No newline at end of file
Property changes on: trunk/gtools/ChangeLog
___________________________________________________________________
Added: svn:special
+ *
Added: trunk/gtools/NEWS
===================================================================
--- trunk/gtools/NEWS (rev 0)
+++ trunk/gtools/NEWS 2009-05-09 03:26:19 UTC (rev 1327)
@@ -0,0 +1 @@
+link inst/NEWS
\ No newline at end of file
Property changes on: trunk/gtools/NEWS
___________________________________________________________________
Added: svn:special
+ *
Modified: trunk/gtools/inst/NEWS
===================================================================
--- trunk/gtools/inst/NEWS 2009-05-09 03:15:10 UTC (rev 1326)
+++ trunk/gtools/inst/NEWS 2009-05-09 03:26:19 UTC (rev 1327)
@@ -1,3 +1,21 @@
+
+gtools 2.6.1
+------------
+
+New features:
+
+- Add newVersionAvailable() function to compare running and latest
+ available R versions.
+
+- Add keywords() function to show $RHOME/doc/KEYWORDS file
+
+Bug fixes:
+
+- Correct windows make flags as suggested by Brian Ripley.
+
+- Update Greg's email address and fix Rd syntax errors
+
+
gtools 2.5.0
------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ggr...@us...> - 2010-04-28 17:23:14
|
Revision: 1431
http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1431&view=rev
Author: ggrothendieck2
Date: 2010-04-28 17:23:08 +0000 (Wed, 28 Apr 2010)
Log Message:
-----------
fixed problems with R CMD CHECK
Modified Paths:
--------------
trunk/gtools/R/quantcut.R
trunk/gtools/R/strmacro.R
trunk/gtools/man/binsearch.Rd
trunk/gtools/man/capture.Rd
trunk/gtools/man/setTCPNoDelay.Rd
Modified: trunk/gtools/R/quantcut.R
===================================================================
--- trunk/gtools/R/quantcut.R 2010-02-27 20:56:39 UTC (rev 1430)
+++ trunk/gtools/R/quantcut.R 2010-04-28 17:23:08 UTC (rev 1431)
@@ -39,7 +39,7 @@
sapply(x,
function(y) if(length(y)==2) y[c(2,2)] else y[2:3]
)
- pairs <- mkpairs(strsplit(levs, '[^0-9+\\.\\-]+', extended=TRUE))
+ pairs <- mkpairs(strsplit(levs, '[^0-9+\\.\\-]+'))
rownames(pairs) <- c("lower.bound","upper.bound")
colnames(pairs) <- levs
Modified: trunk/gtools/R/strmacro.R
===================================================================
--- trunk/gtools/R/strmacro.R 2010-02-27 20:56:39 UTC (rev 1430)
+++ trunk/gtools/R/strmacro.R 2010-04-28 17:23:08 UTC (rev 1431)
@@ -74,8 +74,7 @@
body <- gsub(pattern,
value,
- body,
- extended=TRUE)
+ body)
}
#print(body)
Modified: trunk/gtools/man/binsearch.Rd
===================================================================
--- trunk/gtools/man/binsearch.Rd 2010-02-27 20:56:39 UTC (rev 1430)
+++ trunk/gtools/man/binsearch.Rd 2010-04-28 17:23:08 UTC (rev 1431)
@@ -64,8 +64,8 @@
\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.}
-\seealso{ \code{\link[base]{optim}}, \code{\link[base]{optimize}},
- \code{\link[base]{uniroot}} }
+\seealso{ \code{\link{optim}}, \code{\link{optimize}},
+ \code{\link{uniroot}} }
\examples{
### Toy examples
Modified: trunk/gtools/man/capture.Rd
===================================================================
--- trunk/gtools/man/capture.Rd 2010-02-27 20:56:39 UTC (rev 1430)
+++ trunk/gtools/man/capture.Rd 2010-04-28 17:23:08 UTC (rev 1431)
@@ -33,7 +33,7 @@
\author{Gregory R. Warnes \email{gr...@ra...} }
\seealso{
\code{\link[session]{texteval}},
- \code{\link[base]{capture.output}}
+ \code{\link{capture.output}}
}
\examples{
Modified: trunk/gtools/man/setTCPNoDelay.Rd
===================================================================
--- trunk/gtools/man/setTCPNoDelay.Rd 2010-02-27 20:56:39 UTC (rev 1430)
+++ trunk/gtools/man/setTCPNoDelay.Rd 2010-04-28 17:23:08 UTC (rev 1431)
@@ -41,8 +41,8 @@
}
\author{Gregory R. Warnes \email{gr...@ra...}}
\seealso{
- \code{\link[utils]{make.socket}},
- \code{\link[utils]{socketConnection}}
+ \code{\link{make.socket}},
+ \code{\link{socketConnection}}
}
\examples{
\dontrun{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2010-05-01 22:03:10
|
Revision: 1433
http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1433&view=rev
Author: warnes
Date: 2010-05-01 22:03:03 +0000 (Sat, 01 May 2010)
Log Message:
-----------
Change Greg's email address to gr...@wa...
Modified Paths:
--------------
trunk/gtools/DESCRIPTION
trunk/gtools/man/addLast.Rd
trunk/gtools/man/ask.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/invalid.Rd
trunk/gtools/man/keywords.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 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/DESCRIPTION 2010-05-01 22:03:03 UTC (rev 1433)
@@ -5,5 +5,5 @@
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 <gr...@ra...>
+Maintainer: Gregory R. Warnes <gr...@wa...>
License: LGPL-2.1
Modified: trunk/gtools/man/addLast.Rd
===================================================================
--- trunk/gtools/man/addLast.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/addLast.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -20,7 +20,7 @@
\value{
None.
}
-\author{Gregory R. Warnes \email{gr...@ra...}}
+\author{Gregory R. Warnes \email{gr...@wa...}}
\seealso{ \code{\link[base]{.Last}} }
\examples{
Modified: trunk/gtools/man/ask.Rd
===================================================================
--- trunk/gtools/man/ask.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/ask.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -18,7 +18,7 @@
\value{
A character scalar containing the input providede by the user.
}
-\author{Gregory R. Warnes \email{gr...@ra...}}
+\author{Gregory R. Warnes \email{gr...@wa...}}
\seealso{ \code{\link{readLines}}, \code{\link{scan}} }
\examples{
Modified: trunk/gtools/man/binsearch.Rd
===================================================================
--- trunk/gtools/man/binsearch.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/binsearch.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -60,7 +60,7 @@
\code{where}.}
}
%\references{ ~put references to the literature/web site here ~ }
-\author{Gregory R. Warnes \email{gr...@ra...} }
+\author{Gregory R. Warnes \email{gr...@wa...} }
\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 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/capture.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -30,7 +30,7 @@
\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...@ra...} }
+\author{Gregory R. Warnes \email{gr...@wa...} }
\seealso{
\code{\link[session]{texteval}},
\code{\link{capture.output}}
Modified: trunk/gtools/man/combinations.Rd
===================================================================
--- trunk/gtools/man/combinations.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/combinations.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -40,7 +40,7 @@
\author{ Original versions by Bill Venables
\email{Bil...@cm...}. Extended to handle
\code{repeats.allowed} by Gregory R. Warnes
- \email{gr...@ra...}.
+ \email{gr...@wa...}.
}
\seealso{ \code{\link[base]{choose}}, \code{\link[base]{options}} }
\examples{
Modified: trunk/gtools/man/defmacro.Rd
===================================================================
--- trunk/gtools/man/defmacro.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/defmacro.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -64,7 +64,7 @@
No. 3, pp 11--13, \url{http://CRAN.R-project.org/doc/Rnews/}
}
\author{ Thomas Lumley wrote \code{defmacro}. Gregory R. Warnes
- \email{gr...@ra...} enhanced it and created
+ \email{gr...@wa...} enhanced it and created
\code{strmacro}.
}
\seealso{
Modified: trunk/gtools/man/dirichlet.Rd
===================================================================
--- trunk/gtools/man/dirichlet.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/dirichlet.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -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{gr...@ra...}.
+ \email{gr...@wa...}.
}
\seealso{ \code{\link{dbeta}}, \code{\link{rbeta}} }
\examples{
Modified: trunk/gtools/man/foldchange.Rd
===================================================================
--- trunk/gtools/man/foldchange.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/foldchange.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -37,7 +37,7 @@
A vector or matrix of the same dimensions as the input containing the
converted values.
}
-\author{ Gregory R. Warnes \email{gr...@ra...} }
+\author{ Gregory R. Warnes \email{gr...@wa...} }
\examples{
a <- 1:21
Modified: trunk/gtools/man/invalid.Rd
===================================================================
--- trunk/gtools/man/invalid.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/invalid.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -17,7 +17,7 @@
\value{
Logical value.
}
-\author{Gregory R. Warnes \email{gr...@ra...} }
+\author{Gregory R. Warnes \email{gr...@wa...} }
\seealso{ \code{\link[base]{missing}}, \code{\link[base]{is.na}},
\code{\link[base]{is.null}} }
\examples{
Modified: trunk/gtools/man/keywords.Rd
===================================================================
--- trunk/gtools/man/keywords.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/keywords.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -17,7 +17,7 @@
\value{
Nothing of interest.
}
-\author{Gregory R. Warnes \email{gr...@ra...}}
+\author{Gregory R. Warnes \email{gr...@wa...}}
\seealso{ \code{\link[utils]{help}} }
\examples{
keywords()
Modified: trunk/gtools/man/logit.Rd
===================================================================
--- trunk/gtools/man/logit.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/logit.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -42,7 +42,7 @@
\value{
Transformed value(s).
}
-\author{ Gregory R. Warnes \email{gr...@ra...} }
+\author{ Gregory R. Warnes \email{gr...@wa...} }
\seealso{ \code{\link[car]{logit}}, \code{\link[moc]{inv.glogit}} }
\examples{
Modified: trunk/gtools/man/mixedsort.Rd
===================================================================
--- trunk/gtools/man/mixedsort.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/mixedsort.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -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{gr...@ra...} }
+\author{ Gregory R. Warnes \email{gr...@wa...} }
\seealso{ \code{\link[base]{sort}}, \code{\link[base]{order}} }
\examples{
# compound & dose labels
Modified: trunk/gtools/man/oddeven.Rd
===================================================================
--- trunk/gtools/man/oddeven.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/oddeven.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -17,7 +17,7 @@
\value{
Vector of TRUE/FALSE values.
}
-\author{ Gregory R. Warnes \email{gr...@ra...}}
+\author{ Gregory R. Warnes \email{gr...@wa...}}
\seealso{ \code{\link[base]{round}} }
\examples{
Modified: trunk/gtools/man/permute.Rd
===================================================================
--- trunk/gtools/man/permute.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/permute.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -18,7 +18,7 @@
\value{
Vector with the original items reordered.
}
-\author{ Gregory R. Warnes \email{gr...@ra...} }
+\author{ Gregory R. Warnes \email{gr...@wa...} }
\seealso{ \code{\link{sample}} }
\examples{
Modified: trunk/gtools/man/quantcut.Rd
===================================================================
--- trunk/gtools/man/quantcut.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/quantcut.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -34,7 +34,7 @@
Factor variable with one level for each quantile interval given by \code{q}.
}
-\author{Gregory R. Warnes \email{gr...@ra...}}
+\author{Gregory R. Warnes \email{gr...@wa...}}
\seealso{ \code{\link{cut}}, \code{\link{quantile}} }
Modified: trunk/gtools/man/running.Rd
===================================================================
--- trunk/gtools/man/running.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/running.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -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{gr...@ra...},
+\author{ Gregory R. Warnes \email{gr...@wa...},
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 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/scat.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -18,7 +18,7 @@
\value{
NULL (invisibly)
}
-\author{Gregory R. Warnes \email{gr...@ra...}}
+\author{Gregory R. Warnes \email{gr...@wa...}}
\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 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/setTCPNoDelay.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -39,7 +39,7 @@
Request for Comments 896, January 1984.
\url{http://www.ietf.org/rfc/rfc0896.txt?number=896}
}
-\author{Gregory R. Warnes \email{gr...@ra...}}
+\author{Gregory R. Warnes \email{gr...@wa...}}
\seealso{
\code{\link{make.socket}},
\code{\link{socketConnection}}
Modified: trunk/gtools/man/smartbind.Rd
===================================================================
--- trunk/gtools/man/smartbind.Rd 2010-05-01 21:59:48 UTC (rev 1432)
+++ trunk/gtools/man/smartbind.Rd 2010-05-01 22:03:03 UTC (rev 1433)
@@ -22,7 +22,7 @@
character strings. The user will need to coerce such character
columns into an appropriate type.
}
-\author{Gregory R. Warnes \email{gr...@ra...}}
+\author{Gregory R. Warnes \email{gr...@wa...}}
\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...> - 2011-09-28 22:53:08
|
Revision: 1511
http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1511&view=rev
Author: warnes
Date: 2011-09-28 22:53:02 +0000 (Wed, 28 Sep 2011)
Log Message:
-----------
Add 'fill' argument to smartbind() to specify a value to use for
missing entries.
Modified Paths:
--------------
trunk/gtools/DESCRIPTION
trunk/gtools/man/smartbind.Rd
Modified: trunk/gtools/DESCRIPTION
===================================================================
--- trunk/gtools/DESCRIPTION 2011-09-28 22:48:38 UTC (rev 1510)
+++ trunk/gtools/DESCRIPTION 2011-09-28 22:53:02 UTC (rev 1511)
@@ -1,8 +1,8 @@
Package: gtools
Title: Various R programming tools
Description: Various R programming tools
-Version: 2.6.2
-Date: 2010-05-01
+Version: 2.6.3
+Date: 2010-09-28
Author: Gregory R. Warnes. Includes R source code and/or documentation
contributed by Ben Bolker and Thomas Lumley
Maintainer: Gregory R. Warnes <gr...@wa...>
Modified: trunk/gtools/man/smartbind.Rd
===================================================================
--- trunk/gtools/man/smartbind.Rd 2011-09-28 22:48:38 UTC (rev 1510)
+++ trunk/gtools/man/smartbind.Rd 2011-09-28 22:53:02 UTC (rev 1511)
@@ -5,10 +5,12 @@
Efficient rbind of data frames, even if the column names don't match
}
\usage{
-smartbind(...)
+smartbind(..., fill=NA)
}
\arguments{
\item{\dots}{Data frames to combine}
+ \item{fill}{Value to use when 'filling' missing columns.
+ Defaults to \code{NA}. }
}
\value{
The returned data frame will contain:
@@ -39,6 +41,9 @@
# but smartbind combines them, appropriately creating NA entries
smartbind(df1, df2)
+ # specify fill=0 to put 0 into the missing row entries
+ smartbind(df1, df2, fill=0)
+
\dontshow{
n=10 # number of data frames to create
s=10 # number of rows in each data frame
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2011-09-28 22:53:53
|
Revision: 1512
http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1512&view=rev
Author: warnes
Date: 2011-09-28 22:53:47 +0000 (Wed, 28 Sep 2011)
Log Message:
-----------
Add 'fill' argument to smartbind() to specify a value to use for
missing entries.
Modified Paths:
--------------
trunk/gtools/R/smartbind.R
trunk/gtools/inst/NEWS
Modified: trunk/gtools/R/smartbind.R
===================================================================
--- trunk/gtools/R/smartbind.R 2011-09-28 22:53:02 UTC (rev 1511)
+++ trunk/gtools/R/smartbind.R 2011-09-28 22:53:47 UTC (rev 1512)
@@ -2,7 +2,7 @@
## Function to do rbind of data frames quickly, even if the columns don't match
##
-smartbind <- function(...)
+smartbind <- function(..., fill=NA)
{
verbose <- FALSE
@@ -47,7 +47,7 @@
newclass <- "character"
else
newclass <- class(block[,col])
- retval[[col]] <- as.vector(rep(NA,nrows), mode=newclass)
+ retval[[col]] <- as.vector(rep(fill,nrows), mode=newclass)
}
retval[[col]][start:end] <- as.vector(block[,col],
Modified: trunk/gtools/inst/NEWS
===================================================================
--- trunk/gtools/inst/NEWS 2011-09-28 22:53:02 UTC (rev 1511)
+++ trunk/gtools/inst/NEWS 2011-09-28 22:53:47 UTC (rev 1512)
@@ -1,4 +1,11 @@
+gtools 2.6.2 - 2011-09-28
+-------------------------
+New features:
+
+- Add 'fill' argument to smartbind() to specify a value to use for
+ missing entries.
+
gtools 2.6.1
------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2011-10-05 16:53:45
|
Revision: 1517
http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1517&view=rev
Author: warnes
Date: 2011-10-05 16:53:39 +0000 (Wed, 05 Oct 2011)
Log Message:
-----------
Add 'sep' argument to smartbind() to allow specification of character used to separate components of constructed names
Modified Paths:
--------------
trunk/gtools/R/smartbind.R
trunk/gtools/man/smartbind.Rd
Modified: trunk/gtools/R/smartbind.R
===================================================================
--- trunk/gtools/R/smartbind.R 2011-10-05 15:31:55 UTC (rev 1516)
+++ trunk/gtools/R/smartbind.R 2011-10-05 16:53:39 UTC (rev 1517)
@@ -2,7 +2,7 @@
## Function to do rbind of data frames quickly, even if the columns don't match
##
-smartbind <- function(..., fill=NA)
+smartbind <- function(..., fill=NA, sep=':')
{
verbose <- FALSE
@@ -26,7 +26,7 @@
rowNameList <- unlist(lapply( names(data),
function(x)
if(rowLens[x]<=1) x
- else paste(x, seq(1,rowLens[x]),sep='.'))
+ else paste(x, seq(1,rowLens[x]),sep=sep))
)
Modified: trunk/gtools/man/smartbind.Rd
===================================================================
--- trunk/gtools/man/smartbind.Rd 2011-10-05 15:31:55 UTC (rev 1516)
+++ trunk/gtools/man/smartbind.Rd 2011-10-05 16:53:39 UTC (rev 1517)
@@ -5,12 +5,14 @@
Efficient rbind of data frames, even if the column names don't match
}
\usage{
-smartbind(..., fill=NA)
+smartbind(..., fill=NA, sep=':')
}
\arguments{
\item{\dots}{Data frames to combine}
\item{fill}{Value to use when 'filling' missing columns.
Defaults to \code{NA}. }
+ \item{sep}{Character string used to separate column names when pasting
+ them together.}
}
\value{
The returned data frame will contain:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2012-06-19 19:00:37
|
Revision: 1570
http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1570&view=rev
Author: warnes
Date: 2012-06-19 19:00:31 +0000 (Tue, 19 Jun 2012)
Log Message:
-----------
Update for gtools 2.7.0.
Modified Paths:
--------------
trunk/gtools/DESCRIPTION
trunk/gtools/inst/NEWS
Modified: trunk/gtools/DESCRIPTION
===================================================================
--- trunk/gtools/DESCRIPTION 2012-06-19 14:00:10 UTC (rev 1569)
+++ trunk/gtools/DESCRIPTION 2012-06-19 19:00:31 UTC (rev 1570)
@@ -1,8 +1,8 @@
Package: gtools
Title: Various R programming tools
Description: Various R programming tools
-Version: 2.6.4
-Date: 2010-10-05
+Version: 2.7.0
+Date: 2012-06-19
Author: Gregory R. Warnes. Includes R source code and/or documentation
contributed by Ben Bolker and Thomas Lumley
Maintainer: Gregory R. Warnes <gr...@wa...>
Modified: trunk/gtools/inst/NEWS
===================================================================
--- trunk/gtools/inst/NEWS 2012-06-19 14:00:10 UTC (rev 1569)
+++ trunk/gtools/inst/NEWS 2012-06-19 19:00:31 UTC (rev 1570)
@@ -1,3 +1,20 @@
+gtools 2.7.0 - 2012-06-19
+-------------------------
+
+New features:
+
+- smartbind() has a new 'sep' argument to allow specification of the
+ character(s) used to separate components of constructed column names
+
+- smartbind() has a new 'verbose' argument to provide details on how
+ coluumns are being processed
+
+Bug fixes:
+
+- smartbind() has been enhanced to improve handling of factor and
+ ordered factor columns.
+
+
gtools 2.6.2 - 2011-09-28
-------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2013-07-05 17:31:59
|
Revision: 1694
http://sourceforge.net/p/r-gregmisc/code/1694
Author: warnes
Date: 2013-07-05 17:31:56 +0000 (Fri, 05 Jul 2013)
Log Message:
-----------
Update for gtools 2.7.2
Modified Paths:
--------------
trunk/gtools/DESCRIPTION
trunk/gtools/inst/NEWS
Modified: trunk/gtools/DESCRIPTION
===================================================================
--- trunk/gtools/DESCRIPTION 2013-07-05 17:29:07 UTC (rev 1693)
+++ trunk/gtools/DESCRIPTION 2013-07-05 17:31:56 UTC (rev 1694)
@@ -1,9 +1,8 @@
Package: gtools
Title: Various R programming tools
Description: Various R programming tools
-Version: 2.7.0
-Date: 2012-06-19
-Author: Gregory R. Warnes. Includes R source code and/or documentation
- contributed by Ben Bolker and Thomas Lumley
+Version: 2.7.2
+Date: 2013-07-05
+Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley
Maintainer: Gregory R. Warnes <gr...@wa...>
License: LGPL-2.1
Modified: trunk/gtools/inst/NEWS
===================================================================
--- trunk/gtools/inst/NEWS 2013-07-05 17:29:07 UTC (rev 1693)
+++ trunk/gtools/inst/NEWS 2013-07-05 17:31:56 UTC (rev 1694)
@@ -1,3 +1,18 @@
+gtools 2.7.2 - 2013-07-05
+-------------------------
+
+Bug fixes:
+
+- Update checkRVersion() to works with R version 3.0.0 and later.
+
+gtools 2.7.1 - 2013-03-17
+-------------------------
+
+Bug fixes:
+
+- smartbind() was not properly handling factor columns when the first
+ data frame did not include the relevant column.
+
gtools 2.7.0 - 2012-06-19
-------------------------
@@ -32,7 +47,7 @@
available R versions.
- Add keywords() function to show $RHOME/doc/KEYWORDS file
-
+
Bug fixes:
- Correct windows make flags as suggested by Brian Ripley.
@@ -46,7 +61,7 @@
New features:
- Add checkRVersion() function to determin if a newer version of R is
- available.
+ available.
- Deprecated assert() in favor of base::stopifnot
@@ -60,12 +75,12 @@
function().
- Update definitions of odd() and even() to use modulus operator
- instead of division.
+ instead of division.
gtools 2.4.0
------------
-- Add binsearch() function, previously in the genetics() package.
+- Add binsearch() function, previously in the genetics() package.
gtools 2.3.1
@@ -96,7 +111,7 @@
- NAMESPACE: Add UseDynLib to NAMESPACE so the shared library gets
properly loaded.
- - Updated Greg's email address.
+ - Updated Greg's email address.
gtools 2.2.1
------------
@@ -113,7 +128,7 @@
- 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,
+ 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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2013-07-05 23:34:40
|
Revision: 1696
http://sourceforge.net/p/r-gregmisc/code/1696
Author: warnes
Date: 2013-07-05 23:34:38 +0000 (Fri, 05 Jul 2013)
Log Message:
-----------
Update for gtools 2.7.2 mark 2
Modified Paths:
--------------
trunk/gtools/DESCRIPTION
trunk/gtools/inst/NEWS
Modified: trunk/gtools/DESCRIPTION
===================================================================
--- trunk/gtools/DESCRIPTION 2013-07-05 23:33:15 UTC (rev 1695)
+++ trunk/gtools/DESCRIPTION 2013-07-05 23:34:38 UTC (rev 1696)
@@ -6,3 +6,4 @@
Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley
Maintainer: Gregory R. Warnes <gr...@wa...>
License: LGPL-2.1
+
Modified: trunk/gtools/inst/NEWS
===================================================================
--- trunk/gtools/inst/NEWS 2013-07-05 23:33:15 UTC (rev 1695)
+++ trunk/gtools/inst/NEWS 2013-07-05 23:34:38 UTC (rev 1696)
@@ -5,6 +5,10 @@
- Update checkRVersion() to works with R version 3.0.0 and later.
+Other changes:
+
+- Remove cross-reference to (obsolete?) moc package
+
gtools 2.7.1 - 2013-03-17
-------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2013-07-06 23:26:10
|
Revision: 1699
http://sourceforge.net/p/r-gregmisc/code/1699
Author: warnes
Date: 2013-07-06 23:26:07 +0000 (Sat, 06 Jul 2013)
Log Message:
-----------
Create new function lastAdd to replace addLast and mark addLast as deprecated.
Modified Paths:
--------------
trunk/gtools/R/addLast.R
trunk/gtools/man/gtools-deprecated.Rd
Added Paths:
-----------
trunk/gtools/man/addLast-deprecated.Rd
trunk/gtools/man/gtools-defunct.Rd
trunk/gtools/man/lastAdd.Rd
Removed Paths:
-------------
trunk/gtools/man/addLast.Rd
Modified: trunk/gtools/R/addLast.R
===================================================================
--- trunk/gtools/R/addLast.R 2013-07-05 23:48:27 UTC (rev 1698)
+++ trunk/gtools/R/addLast.R 2013-07-06 23:26:07 UTC (rev 1699)
@@ -1,8 +1,30 @@
addLast <- function( fun )
{
+ .Deprecated(new=paste(".Last <- lastAdd(", deparse(substitute(fun)), ")"),
+ package='gtools'
+ )
+
if (!is.function(fun)) stop("fun must be a function")
+ if (!exists(".Last", envir = .GlobalEnv))
+ assign(".Last", fun, envir = .GlobalEnv)
+ else
+ {
+ Last <- get(".Last", envir = .GlobalEnv)
+ newfun <- function(...) {
+ fun()
+ Last()
+ }
+ assign(".Last", newfun, envir = .GlobalEnv)
+ }
+ }
+
+lastAdd <- function( fun )
+ {
+ if (!is.function(fun)) stop("fun must be a function")
if(!exists(".Last", envir=.GlobalEnv))
- assign(".Last", fun, envir=.GlobalEnv)
+ {
+ return(fun)
+ }
else
{
Last <- get(".Last", envir=.GlobalEnv)
@@ -11,6 +33,7 @@
fun()
Last()
}
- assign(".Last", newfun, envir=.GlobalEnv)
+ return(newfun)
}
}
+
Copied: trunk/gtools/man/addLast-deprecated.Rd (from rev 1697, trunk/gtools/man/addLast.Rd)
===================================================================
--- trunk/gtools/man/addLast-deprecated.Rd (rev 0)
+++ trunk/gtools/man/addLast-deprecated.Rd 2013-07-06 23:26:07 UTC (rev 1699)
@@ -0,0 +1,78 @@
+\name{addLast-deprecated}
+\alias{addLast-deprecated}
+\title{Add a function to be executed when R exits.}
+\description{
+ Add a function to be executed when R exits.
+}
+\usage{
+addLast(fun)
+}
+\arguments{
+ \item{fun}{Function to be called.}
+}
+\details{
+ \code{addLast} defines the \code{.Last} function in the global
+ environment (if not already present) or redifines it so that the
+ function \code{fun} will be called when R exits. The latter is
+ accomplished by saving the current definition of \code{.Last} and
+ creating a new \code{.Last} function that calls \code{fun} and then
+ the original \code{.Last} function.
+}
+\value{
+ None.
+}
+\note{This function has been deprecated in favor of \code{lastAdd}
+ because it creates/modifies the definition of '.Last' in the
+ global environment, which is expressly disallowed by the CRAN
+ policies. }
+\author{Gregory R. Warnes \email{gr...@wa...}}
+\seealso{
+ \code{\link[base]{.Last}},
+ \code{\link[gtools]{lastAdd}}
+}
+\examples{
+
+## Print a couple of cute messages when R exits.
+helloWorld <- function() cat("\nHello World!\n")
+byeWorld <- function() cat("\nGoodbye World!\n")
+
+addLast(byeWorld)
+addLast(helloWorld)
+
+\dontrun{
+q("no")
+
+## Should yield:
+##
+## Save workspace image? [y/n/c]: n
+##
+## Hello World!
+##
+## Goodbye World!
+##
+## Process R finished at Tue Nov 22 10:28:55 2005
+}
+
+## Unix-flavour example: send Rplots.ps to printer on exit.
+myLast <- function()
+{
+ cat("Now sending PostScript graphics to the printer:\n")
+ system("lpr Rplots.ps")
+ cat("bye bye...\n")
+}
+addLast(myLast)
+\dontrun{
+quit("yes")
+
+## Should yield:
+##
+## Now sending PostScript graphics to the printer:
+## lpr: job 1341 queued
+## bye bye...
+##
+## Process R finished at Tue Nov 22 10:28:55 2005
+}
+
+}
+\keyword{programming}
+
Deleted: trunk/gtools/man/addLast.Rd
===================================================================
--- trunk/gtools/man/addLast.Rd 2013-07-05 23:48:27 UTC (rev 1698)
+++ trunk/gtools/man/addLast.Rd 2013-07-06 23:26:07 UTC (rev 1699)
@@ -1,73 +0,0 @@
-\name{addLast}
-\alias{addLast}
-\title{Add a function to be executed when R exits.}
-\description{
- Add a function to be executed when R exits.
-}
-\usage{
-addLast(fun)
-}
-\arguments{
- \item{fun}{Function to be called.}
-}
-\details{
- \code{addLast} defines the \code{.Last} function in the global
- environment (if not already present) or redifines it so that the
- function \code{fun} will be called when R exits. The latter is
- accomplished by saving the current definition of \code{.Last} and
- creating a new \code{.Last} function that calls \code{fun} and then
- the original \code{.Last} function.
-}
-\value{
- None.
-}
-\note{This function creates/modifies the definition of '.Last' in the
- global environment.}
-\author{Gregory R. Warnes \email{gr...@wa...}}
-\seealso{ \code{\link[base]{.Last}} }
-\examples{
-
-## Print a couple of cute messages when R exits.
-helloWorld <- function() cat("\nHello World!\n")
-byeWorld <- function() cat("\nGoodbye World!\n")
-
-addLast(byeWorld)
-addLast(helloWorld)
-
-\dontrun{
-q("no")
-
-## Should yield:
-##
-## Save workspace image? [y/n/c]: n
-##
-## Hello World!
-##
-## Goodbye World!
-##
-## Process R finished at Tue Nov 22 10:28:55 2005
-}
-
-## Unix-flavour example: send Rplots.ps to printer on exit.
-myLast <- function()
-{
- cat("Now sending PostScript graphics to the printer:\n")
- system("lpr Rplots.ps")
- cat("bye bye...\n")
-}
-addLast(myLast)
-\dontrun{
-quit("yes")
-
-## Should yield:
-##
-## Now sending PostScript graphics to the printer:
-## lpr: job 1341 queued
-## bye bye...
-##
-## Process R finished at Tue Nov 22 10:28:55 2005
-}
-
-}
-\keyword{programming}
-
Copied: trunk/gtools/man/gtools-defunct.Rd (from rev 1698, trunk/gtools/man/gtools-deprecated.Rd)
===================================================================
--- trunk/gtools/man/gtools-defunct.Rd (rev 0)
+++ trunk/gtools/man/gtools-defunct.Rd 2013-07-06 23:26:07 UTC (rev 1699)
@@ -0,0 +1,20 @@
+\name{gtools-defunct}
+\alias{gtools-defunct}
+\alias{assert}
+\title{Deprecated Functions in the gtools package}
+\description{
+ These functions are no longer available in gtools.
+}
+\usage{
+assert(FLAG)
+}
+\arguments{
+ \item{FLAG}{ Expression that should evaluate to a boolean vector}
+}
+\details{
+ \code{assert} is a defunct synonym for \code{\link[base]{stopifnot}}.
+}
+\seealso{
+ \code{\link{Defunct}}
+}
+\keyword{misc}
Modified: trunk/gtools/man/gtools-deprecated.Rd
===================================================================
--- trunk/gtools/man/gtools-deprecated.Rd 2013-07-05 23:48:27 UTC (rev 1698)
+++ trunk/gtools/man/gtools-deprecated.Rd 2013-07-06 23:26:07 UTC (rev 1699)
@@ -1,24 +1,29 @@
\name{gtools-deprecated}
\alias{gtools-deprecated}
-\alias{assert}
+\alias{addLast}
\title{Deprecated Functions in the gtools package}
\description{
These functions are provided for compatibility with older versions of
gtools, and may be defunct as soon as the next release.
}
\usage{
-assert(FLAG)
+addLast(fun)
}
\arguments{
- \item{FLAG}{ Expression that should evaluate to a boolean vector}
+ \item{fun}{Function to be called.}
}
\details{
The original help page for these functions is often
available at \code{help("oldName-deprecated")} (note the quotes).
- \code{assert} is a deprecated synonym for \code{\link[base]{stopifnot}}.
+ \itemize{
+ \item{ \code{addLast} has been replaced by \code{lastAdd}, which has
+ the same purpose but appled using different syntax. }
+ }
+
}
\seealso{
\code{\link{Deprecated}}
+ \code{\link[gtools]{lastAdd}}
}
\keyword{misc}
Copied: trunk/gtools/man/lastAdd.Rd (from rev 1697, trunk/gtools/man/addLast.Rd)
===================================================================
--- trunk/gtools/man/lastAdd.Rd (rev 0)
+++ trunk/gtools/man/lastAdd.Rd 2013-07-06 23:26:07 UTC (rev 1699)
@@ -0,0 +1,86 @@
+\name{lastAdd}
+\alias{lastAdd}
+\title{Non-destructively construct a .Last function to be executed when R exits.}
+\description{
+ Non-destructively construct a \code{.Last} function to be executed when R exits.
+}
+\usage{
+.Last <- addLast(fun)
+}
+\arguments{
+ \item{fun}{Function to be called.}
+}
+\details{
+ \code{lastAdd} constructs a new function to be used to replace the
+ exising definition of \code{.Last}, which will be executed when R
+ terminates normally.
+
+ If a \code{.Last} function already exists in the global environment,
+ the original definition is stored in a private environment, and the
+ new function is defined to call the function \code{fun} and then to
+ call the previous (stored) definition of \code{.Last}.
+
+ If no \code{.Last} function exists in the global environment,
+ \code{lastAdd} simply returns the function \code{fun}.
+}
+
+\note{
+ This function replaces the (now deprecated) \code{addLast} function.
+}
+\value{
+ A new function to be used for \code{.Last}.
+}
+\author{Gregory R. Warnes \email{gr...@wa...}}
+\seealso{ \code{\link[base]{.Last}} }
+\examples{
+
+## Print a couple of cute messages when R exits.
+helloWorld <- function() cat("\nHello World!\n")
+byeWorld <- function() cat("\nGoodbye World!\n")
+
+.Last <- lastAdd(byeWorld)
+.Last <- lastAdd(helloWorld)
+
+\dontshow{
+.Last()
+}
+\dontrun{
+q("no")
+
+## Should yield:
+##
+## Save workspace image? [y/n/c]: n
+##
+## Hello World!
+##
+## Goodbye World!
+##
+## Process R finished at Tue Nov 22 10:28:55 2005
+}
+
+## Unix-flavour example: send Rplots.ps to printer on exit.
+myLast <- function()
+{
+ cat("Now sending PostScript graphics to the printer:\n")
+ system("lpr Rplots.ps")
+ cat("bye bye...\n")
+}
+.Last <- lastAdd(myLast)
+\dontshow{
+.Last()
+}
+\dontrun{
+quit("yes")
+
+## Should yield:
+##
+## Now sending PostScript graphics to the printer:
+## lpr: job 1341 queued
+## bye bye...
+##
+## Process R finished at Tue Nov 22 10:28:55 2005
+}
+
+}
+\keyword{programming}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2013-07-06 23:43:59
|
Revision: 1700
http://sourceforge.net/p/r-gregmisc/code/1700
Author: warnes
Date: 2013-07-06 23:43:56 +0000 (Sat, 06 Jul 2013)
Log Message:
-----------
Update for gtools 3.0.0
Modified Paths:
--------------
trunk/gtools/DESCRIPTION
trunk/gtools/inst/NEWS
Modified: trunk/gtools/DESCRIPTION
===================================================================
--- trunk/gtools/DESCRIPTION 2013-07-06 23:26:07 UTC (rev 1699)
+++ trunk/gtools/DESCRIPTION 2013-07-06 23:43:56 UTC (rev 1700)
@@ -1,8 +1,8 @@
Package: gtools
Title: Various R programming tools
Description: Various R programming tools
-Version: 2.7.2
-Date: 2013-07-05
+Version: 3.0.0
+Date: 2013-07-06
Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley
Maintainer: Gregory R. Warnes <gr...@wa...>
License: LGPL-2.1
Modified: trunk/gtools/inst/NEWS
===================================================================
--- trunk/gtools/inst/NEWS 2013-07-06 23:26:07 UTC (rev 1699)
+++ trunk/gtools/inst/NEWS 2013-07-06 23:43:56 UTC (rev 1700)
@@ -1,6 +1,24 @@
-gtools 2.7.2 - 2013-07-05
+gtools 3.0.0 - 2013-07-06
-------------------------
+Major changes:
+
+- The function 'addLast()' has been deprecated because it directly
+ manipulates the global environment, which is expressly prohibited by
+ the CRAN policies.
+
+- A new function, 'lastAdd()' has been created to replace 'addLast()'.
+ The name has been changed because the two functions require
+ different syntax. 'addLast()' was used like this:
+
+ byeWorld <- function() cat("\nGoodbye World!\n")
+ addLast(byeWorld)
+
+ The new 'lastAdd()' function is used like this:
+
+ byeWorld <- function() cat("\nGoodbye World!\n")
+ .Last <- lastAdd(byeWorld)
+
Bug fixes:
- Update checkRVersion() to work with R version 3.0.0 and later.
@@ -8,9 +26,10 @@
Other changes:
- Remove cross-reference to (obsolete?) moc package
-- Add text to man page for addLast() noting that the value of .Last is
- changed in the global environment.
+- The function 'assert()' (deprecated since gtools 2.5.0) is no longer
+ available and has been marked defunct.
+
gtools 2.7.1 - 2013-03-17
-------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2013-09-23 15:23:37
|
Revision: 1712
http://sourceforge.net/p/r-gregmisc/code/1712
Author: warnes
Date: 2013-09-23 15:23:34 +0000 (Mon, 23 Sep 2013)
Log Message:
-----------
Update for gtools 3.0.1 release
Modified Paths:
--------------
trunk/gtools/DESCRIPTION
trunk/gtools/inst/NEWS
Modified: trunk/gtools/DESCRIPTION
===================================================================
--- trunk/gtools/DESCRIPTION 2013-09-23 15:19:06 UTC (rev 1711)
+++ trunk/gtools/DESCRIPTION 2013-09-23 15:23:34 UTC (rev 1712)
@@ -1,8 +1,8 @@
Package: gtools
Title: Various R programming tools
Description: Various R programming tools
-Version: 3.0.0
-Date: 2013-07-06
+Version: 3.0.1
+Date: 2013-09-22
Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley
Maintainer: Gregory R. Warnes <gr...@wa...>
License: LGPL-2.1
Modified: trunk/gtools/inst/NEWS
===================================================================
--- trunk/gtools/inst/NEWS 2013-09-23 15:19:06 UTC (rev 1711)
+++ trunk/gtools/inst/NEWS 2013-09-23 15:23:34 UTC (rev 1712)
@@ -1,3 +1,13 @@
+gtools 3.0.1 - 2013-09-22
+-------------------------
+
+Bug fixes:
+
+- Modified 'mixedorder()' to use Use 'suppressWarnings() instead of
+ 'options(warn=-1)'. This will avoid egregious warning messages when
+ called from within a nested environment, such as when run from
+ within 'knitr'
+
gtools 3.0.0 - 2013-07-06
-------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2013-09-23 15:41:40
|
Revision: 1715
http://sourceforge.net/p/r-gregmisc/code/1715
Author: warnes
Date: 2013-09-23 15:41:36 +0000 (Mon, 23 Sep 2013)
Log Message:
-----------
Update files for gtools 3.1.0 release
Modified Paths:
--------------
trunk/gtools/DESCRIPTION
trunk/gtools/inst/NEWS
Modified: trunk/gtools/DESCRIPTION
===================================================================
--- trunk/gtools/DESCRIPTION 2013-09-23 15:37:21 UTC (rev 1714)
+++ trunk/gtools/DESCRIPTION 2013-09-23 15:41:36 UTC (rev 1715)
@@ -1,7 +1,7 @@
Package: gtools
Title: Various R programming tools
Description: Various R programming tools
-Version: 3.0.1
+Version: 3.1.0
Date: 2013-09-22
Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley
Maintainer: Gregory R. Warnes <gr...@wa...>
Modified: trunk/gtools/inst/NEWS
===================================================================
--- trunk/gtools/inst/NEWS 2013-09-23 15:37:21 UTC (rev 1714)
+++ trunk/gtools/inst/NEWS 2013-09-23 15:41:36 UTC (rev 1715)
@@ -1,6 +1,11 @@
-gtools 3.0.1 - 2013-09-22
+gtools 3.1.0 - 2013-09-22
-------------------------
+Major changes:
+
+- The function 'addLast()' (deprecated since gtools 3.0.0) is no
+ longer available, and has been marked defunct.
+
Bug fixes:
- Modified 'mixedorder()' to use Use 'suppressWarnings() instead of
@@ -8,6 +13,7 @@
called from within a nested environment, such as when run from
within 'knitr'
+
gtools 3.0.0 - 2013-07-06
-------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2013-11-06 14:53:56
|
Revision: 1746
http://sourceforge.net/p/r-gregmisc/code/1746
Author: warnes
Date: 2013-11-06 14:53:52 +0000 (Wed, 06 Nov 2013)
Log Message:
-----------
Update files for gtools 3.1.1
Modified Paths:
--------------
trunk/gtools/DESCRIPTION
trunk/gtools/inst/NEWS
Modified: trunk/gtools/DESCRIPTION
===================================================================
--- trunk/gtools/DESCRIPTION 2013-11-06 14:51:16 UTC (rev 1745)
+++ trunk/gtools/DESCRIPTION 2013-11-06 14:53:52 UTC (rev 1746)
@@ -1,8 +1,8 @@
Package: gtools
Title: Various R programming tools
Description: Various R programming tools
-Version: 3.1.0
-Date: 2013-09-22
+Version: 3.1.1
+Date: 2013-11-06
Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley
Maintainer: Gregory R. Warnes <gr...@wa...>
License: LGPL-2.1
Modified: trunk/gtools/inst/NEWS
===================================================================
--- trunk/gtools/inst/NEWS 2013-11-06 14:51:16 UTC (rev 1745)
+++ trunk/gtools/inst/NEWS 2013-11-06 14:53:52 UTC (rev 1746)
@@ -1,3 +1,12 @@
+gtools 3.1.1 - 2013-11-06
+-------------------------
+
+Bug fixes:
+
+- Fix problem with mixedorder/mixedsort when there is zero or one
+ elements in the argument vector.
+
+
gtools 3.1.0 - 2013-09-22
-------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2013-12-23 16:04:06
|
Revision: 1759
http://sourceforge.net/p/r-gregmisc/code/1759
Author: warnes
Date: 2013-12-23 16:04:03 +0000 (Mon, 23 Dec 2013)
Log Message:
-----------
Add stars.pval() function to convert p-values into significance symbols.
Modified Paths:
--------------
trunk/gtools/NAMESPACE
Added Paths:
-----------
trunk/gtools/R/stars.pval.R
trunk/gtools/man/stars.pval.Rd
Modified: trunk/gtools/NAMESPACE
===================================================================
--- trunk/gtools/NAMESPACE 2013-12-18 14:33:28 UTC (rev 1758)
+++ trunk/gtools/NAMESPACE 2013-12-23 16:04:03 UTC (rev 1759)
@@ -31,6 +31,7 @@
setTCPNoDelay,
smartbind,
sprint,
+ stars.pval,
strmacro
)
Added: trunk/gtools/R/stars.pval.R
===================================================================
--- trunk/gtools/R/stars.pval.R (rev 0)
+++ trunk/gtools/R/stars.pval.R 2013-12-23 16:04:03 UTC (rev 1759)
@@ -0,0 +1,8 @@
+stars.pval <- function(p.value)
+ {
+ unclass(
+ symnum(p.value, corr = FALSE, na = FALSE,
+ cutpoints = c(0, 0.001, 0.01, 0.05, 0.1, 1),
+ symbols = c("***", "**", "*", ".", " "))
+ )
+ }
Added: trunk/gtools/man/stars.pval.Rd
===================================================================
--- trunk/gtools/man/stars.pval.Rd (rev 0)
+++ trunk/gtools/man/stars.pval.Rd 2013-12-23 16:04:03 UTC (rev 1759)
@@ -0,0 +1,44 @@
+\name{stars.pval}
+\alias{stars.pval}
+\title{
+Generate significance stars from p-values
+}
+\description{
+ Generate significance stars (e.g. '***', '**', '*', '+') from
+ p-values using R's standard definitions.
+}
+\usage{
+stars.pval(p.value)
+}
+\arguments{
+ \item{p.value}{numeric vector of p-values}
+}
+\details{
+ Mapping from p-value ranges to symbols:
+ \describe{
+ \item{0 - 0.001}{'***'}
+ \item{0.001 - 0.01}{'**'}
+ \item{0.01 - 0.05}{'*'}
+ \item{0.05 - 0.1}{'+'}
+ \item{0.1 - 1.0}{'' (No symbol)}
+ }
+}
+\value{
+ A character vector containing the same number of elements as
+ \code{p-value}, with an attribute "legend" providing the conversion
+ pattern.
+}
+\author{
+ Gregory R. Warnes \email{gr...@wa...}
+}
+\seealso{
+ \code{\link[stats]{symnum}}
+}
+\examples{
+p.val <- c(0.0004, 0.0015, 0.013, 0.044, 0.067, 0.24)
+stars.pval(x)
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+\keyword{ ~kwd1 }
+\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2013-12-23 18:48:18
|
Revision: 1761
http://sourceforge.net/p/r-gregmisc/code/1761
Author: warnes
Date: 2013-12-23 18:48:15 +0000 (Mon, 23 Dec 2013)
Log Message:
-----------
Extend the keywords() function to return keywords associated with a specified topic via 'keywords(topic)'.
Modified Paths:
--------------
trunk/gtools/R/keywords.R
trunk/gtools/man/keywords.Rd
Modified: trunk/gtools/R/keywords.R
===================================================================
--- trunk/gtools/R/keywords.R 2013-12-23 16:08:10 UTC (rev 1760)
+++ trunk/gtools/R/keywords.R 2013-12-23 18:48:15 UTC (rev 1761)
@@ -1,5 +1,33 @@
-keywords <- function( ... )
+keywords <- function( topic )
{
+
file <- file.path(R.home("doc"),"KEYWORDS")
- file.show(file, ...)
+ if(missing(topic))
+ {
+ file.show(file)
+ }
+ else
+ {
+ kw <- scan(file=file, what=character(), sep="\n", quiet=TRUE)
+ kw <- grep("&", kw, value=TRUE)
+ kw <- gsub("&[^&]*$","", kw)
+ kw <- gsub("&+"," ", kw)
+ kw <- na.omit(trim(kw))
+
+ ischar <- tryCatch(is.character(topic) && length(topic) ==
+ 1L, error = identity)
+ if (inherits(ischar, "error"))
+ ischar <- FALSE
+ if (!ischar)
+ topic <- deparse(substitute(topic))
+
+ item <- paste("^",topic,"$", sep="")
+
+ topics <- function(k) help.search(keyword=k)$matches[,"topic"]
+ matches <- lapply(kw, topics)
+ names(matches) <- kw
+
+ tmp <- unlist(lapply( matches, function(m) grep(item, m, value=TRUE) ))
+ names(tmp)
+ }
}
Modified: trunk/gtools/man/keywords.Rd
===================================================================
--- trunk/gtools/man/keywords.Rd 2013-12-23 16:08:10 UTC (rev 1760)
+++ trunk/gtools/man/keywords.Rd 2013-12-23 18:48:15 UTC (rev 1761)
@@ -5,21 +5,24 @@
List valid keywords for R man pages
}
\usage{
-keywords(...)
+keywords(topic)
}
\arguments{
- \item{\dots}{Optional argumenst to pass to show.file()}
+ \item{topic}{object or man page topic}
}
\details{
- This function simply determines the path \$RHOME/doc/KEYWORDS and calls
- show.file() to display it.
+ If \code{topic} is provided, return a list of the keywords associated
+ with \code{topic}. Otherwise, display the list of valid R keywords
+ from the R doc/KEYWORDS file.
}
-\value{
- Nothing of interest.
-}
\author{Gregory R. Warnes \email{gr...@wa...}}
\seealso{ \code{\link[utils]{help}} }
\examples{
+## Show all valid R keywords
keywords()
+
+## Show keywords associated with the 'merge' function
+keywords(merge)
+keywords("merge")
}
\keyword{documentation}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <wa...@us...> - 2014-01-14 19:37:19
|
Revision: 1767
http://sourceforge.net/p/r-gregmisc/code/1767
Author: warnes
Date: 2014-01-14 19:37:16 +0000 (Tue, 14 Jan 2014)
Log Message:
-----------
Add test file for binsearch() function.
Added Paths:
-----------
trunk/gtools/tests/
trunk/gtools/tests/test_binsearch.R
Added: trunk/gtools/tests/test_binsearch.R
===================================================================
--- trunk/gtools/tests/test_binsearch.R (rev 0)
+++ trunk/gtools/tests/test_binsearch.R 2014-01-14 19:37:16 UTC (rev 1767)
@@ -0,0 +1,64 @@
+library(gtools)
+
+##############################
+### Examples from man page ###
+##############################
+
+### Toy examples
+
+# search for x=10
+s <- binsearch( function(x) x-10, range=c(0,20) )
+stopifnot(s$where==10)
+
+# search for x=10.1
+s <- binsearch( function(x) x-10.1, range=c(0,20) )
+stopifnot( s$where==c(10,11) )
+
+### Classical toy example
+
+# binary search for the index of 'M' among the sorted letters
+fun <- function(X) ifelse(LETTERS[X] > 'M', 1,
+ ifelse(LETTERS[X] < 'M', -1, 0 ) )
+
+s = binsearch( fun, range=1:26 )
+stopifnot( LETTERS[s$where]=="M")
+
+##################################
+### Test boundary contiditions ###
+##################################
+
+s = binsearch(fun = function(x) x-10, range=c(1,10) )
+with(s, stopifnot(where==10, value==0, flag=="Found") )
+
+s = binsearch(fun = function(x) x-1, range=c(1,10) )
+with(s, stopifnot(where==1, value==0, flag=="Found") )
+
+
+checkWarning <- function( expr )
+ {
+ myEnv <- environment()
+
+ catchWarning <- function(w) {
+ assign("warningValue", w, pos=myEnv)
+ invokeRestart("muffleWarning")
+ }
+
+ retval <- withCallingHandlers(expr = expr,
+ warning = catchWarning)
+
+
+ if( !exists("warningValue", where=myEnv, inherits=FALSE) )
+ stop("Expected a warning message")
+ }
+
+checkWarning( s <- binsearch(fun = function(x) x-10, range=c(1,9) ) )
+with(s, stopifnot(where==9, value==-1, flag=="Upper Boundary" ) )
+
+checkWarning( s <- binsearch(fun = function(x) x-1, range=c(2,10) ) )
+with(s, stopifnot(where==2, value==1, flag=="Lower Boundary" ) )
+
+
+
+
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2014-01-14 19:43:20
|
Revision: 1768
http://sourceforge.net/p/r-gregmisc/code/1768
Author: warnes
Date: 2014-01-14 19:43:17 +0000 (Tue, 14 Jan 2014)
Log Message:
-----------
Update for bug-fix release
Modified Paths:
--------------
trunk/gtools/DESCRIPTION
trunk/gtools/inst/NEWS
Modified: trunk/gtools/DESCRIPTION
===================================================================
--- trunk/gtools/DESCRIPTION 2014-01-14 19:37:16 UTC (rev 1767)
+++ trunk/gtools/DESCRIPTION 2014-01-14 19:43:17 UTC (rev 1768)
@@ -1,10 +1,9 @@
Package: gtools
Title: Various R programming tools
Description: Various R programming tools
-Version: 3.2.0
-Date: 2014-01-11
+Version: 3.2.2
+Date: 2014-01-14
Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley
Maintainer: Gregory R. Warnes <gr...@wa...>
-Imports: gdata
License: LGPL-2.1
Modified: trunk/gtools/inst/NEWS
===================================================================
--- trunk/gtools/inst/NEWS 2014-01-14 19:37:16 UTC (rev 1767)
+++ trunk/gtools/inst/NEWS 2014-01-14 19:43:17 UTC (rev 1768)
@@ -1,3 +1,20 @@
+gtools 3.2.2 - 2014-01-14
+-------------------------
+
+Bug fixes:
+
+- binsearch() was returning the wrong endpoint & value when the found
+ value was at the upper endpoint.
+
+
+gtools 3.2.1 - 2014-01-13
+-------------------------
+
+Bug fixes:
+
+- Resolve circular dependency with gdata
+
+
gtools 3.2.0 - 2014-01-11
-------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2014-02-11 17:14:12
|
Revision: 1769
http://sourceforge.net/p/r-gregmisc/code/1769
Author: warnes
Date: 2014-02-11 17:14:08 +0000 (Tue, 11 Feb 2014)
Log Message:
-----------
Add getDependencies() function to return a list of package dependencies.
Modified Paths:
--------------
trunk/gtools/DESCRIPTION
trunk/gtools/NAMESPACE
Added Paths:
-----------
trunk/gtools/R/clean_up_dependencies2.R
trunk/gtools/R/getDependencies.R
trunk/gtools/man/getDependencies.Rd
Modified: trunk/gtools/DESCRIPTION
===================================================================
--- trunk/gtools/DESCRIPTION 2014-01-14 19:43:17 UTC (rev 1768)
+++ trunk/gtools/DESCRIPTION 2014-02-11 17:14:08 UTC (rev 1769)
@@ -1,8 +1,8 @@
Package: gtools
Title: Various R programming tools
Description: Various R programming tools
-Version: 3.2.2
-Date: 2014-01-14
+Version: 3.3.0
+Date: 2014-02-11
Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley
Maintainer: Gregory R. Warnes <gr...@wa...>
License: LGPL-2.1
Modified: trunk/gtools/NAMESPACE
===================================================================
--- trunk/gtools/NAMESPACE 2014-01-14 19:43:17 UTC (rev 1768)
+++ trunk/gtools/NAMESPACE 2014-02-11 17:14:08 UTC (rev 1769)
@@ -13,6 +13,7 @@
even,
foldchange,
foldchange2logratio,
+ getDependencies,
inv.logit,
invalid,
keywords,
Added: trunk/gtools/R/clean_up_dependencies2.R
===================================================================
--- trunk/gtools/R/clean_up_dependencies2.R (rev 0)
+++ trunk/gtools/R/clean_up_dependencies2.R 2014-02-11 17:14:08 UTC (rev 1769)
@@ -0,0 +1,68 @@
+.clean_up_dependencies2 <- function (x, installed, available)
+{
+ .split_dependencies <- function(x) {
+ .split2 <- function(x) {
+ x <- sub("[[:space:]]+$", "", x)
+ x <- unique(sub("^[[:space:]]*(.*)", "\\1", x))
+ names(x) <- sub("^([[:alnum:].]+).*$", "\\1", x)
+ x <- x[names(x) != "R"]
+ x <- x[nzchar(x)]
+ x <- x[!duplicated(names(x))]
+ lapply(x, tools:::.split_op_version)
+ }
+ if (!any(nzchar(x)))
+ return(list())
+ unlist(lapply(strsplit(x, ","), .split2), FALSE, FALSE)
+ }
+ x <- x[!is.na(x)]
+ if (!length(x))
+ return(list(character(), character()))
+ xx <- .split_dependencies(x)
+ if (!length(xx))
+ return(list(character(), character()))
+ pkgs <- installed[, "Package"]
+ have <- sapply(xx, function(x) {
+ if (length(x) == 3L) {
+ if (!x[[1L]] %in% pkgs)
+ return(FALSE)
+ if (x[[2L]] != ">=")
+ return(TRUE)
+ current <- as.package_version(installed[pkgs == x[[1L]],
+ "Version"])
+ target <- as.package_version(x[[3L]])
+ eval(parse(text = paste("any(current", x$op, "target)")))
+ }
+ else x[[1L]] %in% pkgs
+ })
+ xx <- xx[!have]
+ if (!length(xx))
+ return(list(character(), character()))
+ pkgs <- row.names(available)
+ canget <- miss <- character()
+ for (i in seq_along(xx)) {
+ x <- xx[[i]]
+ if (length(x) == 3L) {
+ if (!x[[1L]] %in% pkgs) {
+ miss <- c(miss, x[[1L]])
+ next
+ }
+ if (x[[2L]] != ">=") {
+ canget <- c(canget, x[[1L]])
+ next
+ }
+ current <- as.package_version(available[pkgs == x[[1L]],
+ "Version"])
+ target <- as.package_version(x[[3L]])
+ res <- eval(parse(text = paste("any(current", x$op,
+ "target)")))
+ if (res)
+ canget <- c(canget, x[[1L]])
+ else miss <- c(miss, paste0(x[[1L]], " (>= ", x[[3L]],
+ ")"))
+ }
+ else if (x[[1L]] %in% pkgs)
+ canget <- c(canget, x[[1L]])
+ else miss <- c(miss, x[[1L]])
+ }
+ list(canget, miss)
+}
Added: trunk/gtools/R/getDependencies.R
===================================================================
--- trunk/gtools/R/getDependencies.R (rev 0)
+++ trunk/gtools/R/getDependencies.R 2014-02-11 17:14:08 UTC (rev 1769)
@@ -0,0 +1,96 @@
+## This function determines the dependencies for the specified
+## package, exluding only packages found in "base".
+getDependencies <- function (pkgs,
+ dependencies = c("Depends", "Imports", "LinkingTo"),
+ installed=TRUE,
+ available=TRUE,
+ base=FALSE,
+ recommended=FALSE)
+{
+ pkgs.in = pkgs
+ if (is.null(dependencies))
+ return(unique(pkgs))
+ dep2 <- c("Depends", "Imports", "LinkingTo")
+
+
+ if(installed && !available)
+ all.packages <- installed.packages()
+ else if (available && !installed)
+ all.packages <- available.packages()
+ else
+ all.packages <- as.matrix(smartbind(##
+ installed.packages(),
+ available.packages()
+ ))
+ rownames(all.packages) <- all.packages[,"Package"]
+
+ p0 <- unique(pkgs)
+ miss <- !p0 %in% row.names(all.packages)
+ if (sum(miss)) {
+ warning(sprintf(ngettext(sum(miss), "package %s is not available (for %s)",
+ "packages %s are not available (for %s)"), paste(sQuote(p0[miss]),
+ collapse = ", "), sub(" *\\(.*", "", R.version.string)),
+ domain = NA, call. = FALSE)
+ if (sum(miss) == 1L && !is.na(w <- match(tolower(p0[miss]),
+ tolower(row.names(all.packages))))) {
+ warning(sprintf("Perhaps you meant %s ?", sQuote(row.names(all.packages)[w])),
+ call. = FALSE, domain = NA)
+ }
+ flush.console()
+ }
+
+ ## Whether to exclude base and recommended packages
+ if(!base || !recommended)
+ {
+ priority <- NULL
+ if(!base) priority <- c("base", priority)
+ if(!recommended) priority <- c("recommended", priority)
+ installed <- installed.packages(priority=priority)
+ }
+ else
+ installed <- installed.packages()[FALSE,]
+
+ p0 <- p0[!miss]
+
+ p1 <- p0
+ not_avail <- character()
+ repeat {
+ deps <- apply(all.packages[p1, dependencies, drop = FALSE],
+ 1L, function(x) paste(x[!is.na(x)], collapse = ", "))
+
+ res <- .clean_up_dependencies2(
+ deps,
+ installed=installed,
+ all.packages)
+ not_avail <- c(not_avail, res[[2L]])
+ deps <- unique(res[[1L]])
+ deps <- deps[!deps %in% c("R", pkgs)]
+ if (!length(deps))
+ break
+ pkgs <- c(deps, pkgs)
+ p1 <- deps
+ if (!is.null(dep2)) {
+ dependencies <- dep2
+ dep2 <- NULL
+ }
+ }
+ if (length(not_avail)) {
+ not_avail <- unique(not_avail)
+ warning(sprintf(ngettext(length(not_avail),
+ "dependency %s is not available",
+ "dependencies %s are not available"),
+ paste(sQuote(not_avail),
+ collapse = ", ")),
+ domain = NA,
+ call. = FALSE,
+ immediate. = TRUE)
+ flush.console()
+ }
+ pkgs <- unique(pkgs)
+ pkgs <- pkgs[pkgs %in% row.names(all.packages)]
+ p0 <- pkgs
+
+
+ p0[ ! p0 %in% pkgs.in ]
+}
+
Added: trunk/gtools/man/getDependencies.Rd
===================================================================
--- trunk/gtools/man/getDependencies.Rd (rev 0)
+++ trunk/gtools/man/getDependencies.Rd 2014-02-11 17:14:08 UTC (rev 1769)
@@ -0,0 +1,81 @@
+\name{getDependencies}
+\alias{getDependencies}
+\title{
+ Get package dependencies
+}
+\description{
+ Get package dependencies
+}
+\usage{
+getDependencies(pkgs,
+ dependencies=NA,
+ installed=TRUE,
+ available=TRUE,
+ base=FALSE,
+ recommended=FALSE)
+}
+\arguments{
+ \item{pkgs}{character vector of package names}
+ \item{dependencies}{character vector of dependency types to include.
+ Choices are "Depends", "Imports", "LinkingTo", "Suggests",
+ and "Enhances". Defaults to \code{c("Depends", "Imports",
+ "LinkingTo")}.
+ }
+ \item{installed}{Logical indicating whether to pull dependency
+ information from installed packages. Defaults to TRUE.
+ }
+ \item{available}{Logical indicating whether to pull dependency
+ information from available packages. Defaults to TRUE.
+ }
+ \item{base}{Logical indicating whether to include dependencies on base
+ packages that are included in the R installation. Defaults to
+ FALSE.
+ }
+ \item{base}{Logical indicating whether to include dependencies on
+ recommended packages that are included in the R
+ installation. Defaults to
+ FALSE.
+ }
+}
+\details{
+ This function recursively constructs the list of dependencies for the
+ packages given by \code{pkgs}. By default, the dependency information
+ is extracted from both installed and available packages. As a
+ consequence, it works both for local and CRAN packages.
+}
+\value{
+ A character vector of package names.
+}
+\note{
+ If \code{available=TRUE} R will attempt to access the currently
+ selected CRAN repository, prompting for one if necessary.
+ }
+\author{
+ Gregory R. Warnes email{gr...@wa...} based on the non exported
+ \code{utils:::getDependencies} and
+ \code{utils:::.clean_up_dependencies2}.
+}
+\seealso{
+ \code{\link{installed.packages}},
+ \code{\link{available.packages}}
+}
+\examples{
+## A locally installed package
+getDependencies("MASS", installed=TRUE, available=FALSE)
+
+\dontrun{
+## A package on CRAN
+getDependencies("gregmisc", installed=FALSE, available=TRUE)
+}
+
+## Show base and recommended dependencies
+getDependencies("MASS", available=FALSE, base=TRUE, recommended=TRUE)
+
+\dontrun{
+## Download the set of packages necessary to support a local package
+deps <- getDependencies("MyLocalPackage", available=FALSE)
+download.packages(deps, destdir="./R_Packages")
+}
+
+}
+\keyword{utilities}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2014-03-01 20:02:10
|
Revision: 1774
http://sourceforge.net/p/r-gregmisc/code/1774
Author: warnes
Date: 2014-03-01 20:02:08 +0000 (Sat, 01 Mar 2014)
Log Message:
-----------
Fix bug in gtools::mixedorder regular expression for regognizing numbers. (Periods weren't escaped).
Modified Paths:
--------------
trunk/gtools/R/mixedsort.R
Added Paths:
-----------
trunk/gtools/tests/test_mixedorder.R
Modified: trunk/gtools/R/mixedsort.R
===================================================================
--- trunk/gtools/R/mixedsort.R 2014-02-11 17:44:04 UTC (rev 1773)
+++ trunk/gtools/R/mixedsort.R 2014-03-01 20:02:08 UTC (rev 1774)
@@ -17,7 +17,7 @@
if( is.numeric(x) )
return( order(x) )
-
+
delim="\\$\\@\\$"
numeric <- function(x)
@@ -37,7 +37,7 @@
if(length(which.blanks) >0)
x[ which.blanks ] <- -Inf
-
+
if(length(which.nas) >0)
x[ which.nas ] <- Inf
@@ -47,7 +47,7 @@
####
# find and mark numbers in the form of +1.23e+45.67
- delimited <- gsub("([+-]{0,1}[0-9]+.{0,1}[0-9]*([eE][\\+\\-]{0,1}[0-9]+.{0,1}[0-9]*){0,1})",
+ delimited <- gsub("([+-]{0,1}[0-9]+\\.{0,1}[0-9]*([eE][\\+\\-]{0,1}[0-9]+\\.{0,1}[0-9]*){0,1})",
paste(delim,"\\1",delim,sep=""), x)
# separate out numbers
@@ -90,7 +90,7 @@
t(rank.character) +
apply(matrix(rank.numeric),2,max,na.rm=TRUE)
)
-
+
rank.overall <- ifelse(is.na(rank.character),rank.numeric,rank.character)
order.frame <- as.data.frame(rank.overall)
Added: trunk/gtools/tests/test_mixedorder.R
===================================================================
--- trunk/gtools/tests/test_mixedorder.R (rev 0)
+++ trunk/gtools/tests/test_mixedorder.R 2014-03-01 20:02:08 UTC (rev 1774)
@@ -0,0 +1,27 @@
+library(gtools)
+
+## Examples from man page
+Treatment <- c("Control", "Asprin 10mg/day", "Asprin 50mg/day",
+ "Asprin 100mg/day", "Acetomycin 100mg/day",
+ "Acetomycin 1000mg/day")
+
+stopifnot( mixedorder(tmp)==c(4, 5, 1, 2, 3 ))
+
+
+x <- rev(c("AA 0.50 ml", "AA 1.5 ml", "AA 500 ml", "AA 1500 ml",
+ "EXP 1", "AA 1e3 ml", "A A A", "1 2 3 A", "NA", NA, "1e2",
+ "", "-", "1A", "1 A", "100", "100A", "Inf"))
+
+stopifnot( mixedorder(x)==c(7, 11, 4, 5, 3, 8, 2, 1, 6, 12, 18, 17, 16, 13, 15, 14, 10, 9) )
+
+## Bug reported by Aaron Taudt on 2014-03-01
+
+tmp <- c("uniresult_simulated_H3k27ac_binsize_200_chr1.RData",
+ "uniresult_simulated_H3k27me3_binsize_200_chr1.RData",
+ "uniresult_simulated_H3k36me3_binsize_200_chr1.RData",
+ "uniresult_simulated_H3k4me3_binsize_200_chr1.RData",
+ "uniresult_simulated_H3k9me3_binsize_200_chr1.RData")
+
+stopifnot( mixedorder(tmp)==c(4, 5, 1, 2, 3) )
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wa...@us...> - 2014-03-01 20:12:49
|
Revision: 1775
http://sourceforge.net/p/r-gregmisc/code/1775
Author: warnes
Date: 2014-03-01 20:12:46 +0000 (Sat, 01 Mar 2014)
Log Message:
-----------
Update files for gtools 3.3.1 release
Modified Paths:
--------------
trunk/gtools/DESCRIPTION
trunk/gtools/inst/NEWS
Modified: trunk/gtools/DESCRIPTION
===================================================================
--- trunk/gtools/DESCRIPTION 2014-03-01 20:02:08 UTC (rev 1774)
+++ trunk/gtools/DESCRIPTION 2014-03-01 20:12:46 UTC (rev 1775)
@@ -1,8 +1,8 @@
Package: gtools
Title: Various R programming tools
Description: Various R programming tools
-Version: 3.3.0
-Date: 2014-02-11
+Version: 3.3.1
+Date: 2014-03-01
Author: Gregory R. Warnes, Ben Bolker, and Thomas Lumley
Maintainer: Gregory R. Warnes <gr...@wa...>
License: LGPL-2.1
Modified: trunk/gtools/inst/NEWS
===================================================================
--- trunk/gtools/inst/NEWS 2014-03-01 20:02:08 UTC (rev 1774)
+++ trunk/gtools/inst/NEWS 2014-03-01 20:12:46 UTC (rev 1775)
@@ -1,3 +1,15 @@
+gtools 3.3.1 - 2014-03-01
+-------------------------
+
+Bug fixes:
+
+- 'mixedorder' (and hence 'mixedsort') not properly handling
+ single-character strings between numbers, so that '1a2' was being
+ handled as a single string rather than being properly handled as
+ c('1', 'a', '2').
+
+
+
gtools 3.3.0 - 2014-02-11
-------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|