I need one more clarification here :
Here I did :
fn - function(i) return(list(i, i^2))
ss = sapply(1:4, fn)
Here the object ss should be a matrix object :
is.matrix(ss)
However I feel it lacks some the matrix object properties. For example the
syntax min(ss[1,]) generates an error :
Error in
megh wrote:
I need one more clarification here :
Here I did :
fn - function(i) return(list(i, i^2))
ss = sapply(1:4, fn)
Here the object ss should be a matrix object :
is.matrix(ss)
However I feel it lacks some the matrix object properties. For example the
syntax min(ss[1,]) generates an
Try str(ss) to see what it really looks like. You probably want:
fn - function(i) c(i, i^2)
On Sat, Nov 22, 2008 at 4:54 AM, megh [EMAIL PROTECTED] wrote:
I need one more clarification here :
Here I did :
fn - function(i) return(list(i, i^2))
ss = sapply(1:4, fn)
Here the object ss
3 matches
Mail list logo