Re: [R] Trouble with [sv]apply

2012-04-20 Thread Bert Gunter
Worik: On Fri, Apr 20, 2012 at 1:22 AM, Worik R wrote: > On Fri, Apr 20, 2012 at 4:42 PM, Jeff Newmiller > wrote: >> If you read the help, it talks about compiling vectors into matrices, or >> scalars into vectors. It does not say anything about combining matrices. >> >> For the error about 14

Re: [R] Trouble with [sv]apply

2012-04-20 Thread Petr PIKAL
Hi > On Fri, Apr 20, 2012 at 4:42 PM, Jeff Newmiller > wrote: > > If you read the help, it talks about compiling vectors into matrices, or > scalars into vectors. It does not say anything about combining matrices. > > > > For the error about 14 elements, you should keep in mind that matrices

Re: [R] Trouble with [sv]apply

2012-04-20 Thread Worik R
On Fri, Apr 20, 2012 at 4:42 PM, Jeff Newmiller wrote: > If you read the help, it talks about compiling vectors into matrices, or > scalars into vectors. It does not say anything about combining matrices. > > For the error about 14 elements, you should keep in mind that matrices are > just vecto

Re: [R] Trouble with [sv]apply

2012-04-19 Thread Bert Gunter
?? Maybe: do.call(rbind, list.of.your;matrices) ?do.call (if you can't do it with explicit loops (i.e. for(), while()), apply type functions are probably not what you want). -- Bert On Thu, Apr 19, 2012 at 2:28 PM, Worik R wrote: > Friends > > I clearly donot understand how sapply and vapply

Re: [R] Trouble with [sv]apply

2012-04-19 Thread Jeff Newmiller
If you read the help, it talks about compiling vectors into matrices, or scalars into vectors. It does not say anything about combining matrices. For the error about 14 elements, you should keep in mind that matrices are just vectors with dim attributes that indicate how the linear memory is to

[R] Trouble with [sv]apply

2012-04-19 Thread Worik R
Friends I clearly donot understand how sapply and vapply work. What I have is a function that returns a matrix with an indeterminate number of rows (some times zero) but a constant number of columns. I cannot reliably use an apply function to assemble the matrices into a matrix. I am not sure i