[R-gregmisc-users] SF.net SVN: r-gregmisc:[1511] trunk/gtools
Brought to you by:
warnes
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. |