Re: [R] Create Matrix of 2 Dim from two vectors

2010-11-08 Thread Vaiva P
Try x1<-matrix(1,3,1)%x%x y1<-y%x%matrix(1,3,1) Z<-cbind(x1,y1) And later you need to move towards list and matrix On Mon, Nov 8, 2010 at 11:15 AM, abotaha wrote: > > Hello, > > I have two data. > > x<-c(1, 2, 3) > y<-c(4,5,6) > > How do i create matrix of 3 by 3 from this two, such that > >

[R] Integrate and mapply

2010-11-07 Thread Vaiva P
Hi, I need some help on integrating a function that is a vector. I have a function - vector which each element is different. And, naturally, function integrate() does not work I checked the article of U. Ligges and J. Fox (2008) about code optimization "How Can I Avoid This Loop or Make It Faster?