[R-gregmisc-users] SF.net SVN: r-gregmisc:[1343] trunk/gdata/man/resample.Rd
Brought to you by:
warnes
From: <wa...@us...> - 2009-07-16 02:50:54
|
Revision: 1343 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1343&view=rev Author: warnes Date: 2009-07-16 02:50:52 +0000 (Thu, 16 Jul 2009) Log Message: ----------- Correct page for resample() Modified Paths: -------------- trunk/gdata/man/resample.Rd Modified: trunk/gdata/man/resample.Rd =================================================================== --- trunk/gdata/man/resample.Rd 2009-07-16 02:49:11 UTC (rev 1342) +++ trunk/gdata/man/resample.Rd 2009-07-16 02:50:52 UTC (rev 1343) @@ -25,36 +25,19 @@ have identical behavior. } \value{ - ~Describe the value returned - If it is a LIST, use - \item{comp1 }{Description of 'comp1'} - \item{comp2 }{Description of 'comp2'} - ... -} -\references{ ~put references to the literature/web site here ~ } -\author{ ~~who you are~~ } -\note{ ~~further notes~~ - ~Make other sections like Warning with \section{Warning }{....} ~ } -\seealso{ ~~objects to See Also as \code{\link{help}}, ~~~ } +\author{Gregory R. Warnes \email{gr...@ra...} } +\seealso{ \code{\link{sample}} } \examples{ -##---- Should be DIRECTLY executable !! ---- -##-- ==> Define data, use random, -##-- or do help(data=index) for the standard data sets. -## The function is currently defined as -function(x, n, ...) - { - if(length(x)==1) - { - if(n==1) - x - else - stop("Requested sample of size ", n, " from list of length 1") - } - else - sample(x, n, ...) - } +## sample behavior differs if first argument is scalar vs vector +sample( c(10) ) +sample( c(10,10) ) + +## resample has the consistent behavior for both cases +resample( c(10) ) +resample( c(10,10) ) + } -\keyword{misc}% at least one, from doc/KEYWORDS +\keyword{misc} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |