Re: [R] Applying min to numeric vectors

2008-12-09 Thread Jorge Ivan Velez
Dear Brigid, Try: pmin(a,b) HTH, Jorge On Tue, Dec 9, 2008 at 11:58 AM, Brigid Mooney <[EMAIL PROTECTED]> wrote: > I was surprised this morning, that it seems as though the min() function > does not work as *I* anticipated when given vector arguments. > > For example: > a <- 1:10 > b <- c(r

Re: [R] Applying min to numeric vectors

2008-12-09 Thread Henrique Dallazuanna
Try this: pmin(a, b) On Tue, Dec 9, 2008 at 2:58 PM, Brigid Mooney <[EMAIL PROTECTED]> wrote: > I was surprised this morning, that it seems as though the min() function > does not work as *I* anticipated when given vector arguments. > > For example: > a <- 1:10 > b <- c(rep(1, times=5), rep(10,