search for: clip_

Displaying 2 results from an estimated 2 matches for "clip_".

Did you mean: clip
2002 Aug 08
0
RE: rmultinom
...stop reading here :) # first, two standard functions of mine: these could go inside or be coded explicitly, of course # Avoid unintended behaviour with : when 2nd arg is lower than 1st assign( '%upto%', function( from, to) if( from <= to) from:to else numeric( 0)) # Trim tail of vector clip_ function( x, n=1) x[ 1 %upto% ( length( x) - n)] rmultinom_ function( n, size, prob, method=if(k>size) "tabulate" else "sucbin") { # returns a n X length( prob) matrix of integers, each row adding up to size k_ length( prob) if( pmatch( method, c( 'sucbin', ...
2002 Aug 08
0
RE: rmultinom
...t, two standard functions of mine: these could go inside or be coded >explicitly, of course ># Avoid unintended behaviour with : when 2nd arg is lower than 1st >assign( '%upto%', function( from, to) if( from <= to) from:to else numeric( >0)) > ># Trim tail of vector >clip_ function( x, n=1) x[ 1 %upto% ( length( x) - n)] > >rmultinom_ function( n, size, prob, method=if(k>size) "tabulate" else >"sucbin") { > # returns a n X length( prob) matrix of integers, each row adding up to >size > > k_ length( prob) > if( pmatch(...