Re: [R] mapply instead for loop

2012-11-03 Thread Omphalodes Verna
Thanks for help.   But, I am surprised, that mapply is slower than for loop?   OV     From: Uwe Ligges Cc: "r-help@r-project.org" Sent: Saturday, November 3, 2012 4:32 PM Subject: Re: [R] mapply instead for loop On 30.10.2012 20:01, Omphal

Re: [R] mapply instead for loop

2012-11-03 Thread Uwe Ligges
On 30.10.2012 20:01, Omphalodes Verna wrote: Hi all! My question in about using mapply instead for loop. Below is a example with for loop: Is it posible to give same results with mapply function? Thanks for help! OV x <- 1:10 y <- 1:10 xyz <- data.frame(expand.grid(x,y)[1], expand.grid(x,y

[R] mapply instead for loop

2012-10-30 Thread Omphalodes Verna
Hi all!   My question in about using mapply instead for loop. Below is a example with for loop: Is it posible to give same results with mapply function?   Thanks for help!   OV   x <- 1:10 y <- 1:10 xyz <- data.frame(expand.grid(x,y)[1], expand.grid(x,y)[2], z = rnorm(100)) names(xyz) <- c("x", "y