Re: [R] function return output

2009-01-16 Thread David Winsemius
On Jan 16, 2009, at 5:22 AM, threshold wrote: Hi, I wrote the function which outputs a matrix 'c' and a single value 'd', as follows (simplified example): procedure <- function(a,b){ ... list(c,d) } now I want to use 'c' and 'd' in code as follows: d <- matrix(0,1,1) value <- procedure(a,b)

Re: [R] function return output

2009-01-16 Thread Uwe Ligges
threshold wrote: Hi, I wrote the function which outputs a matrix 'c' and a single value 'd', as follows (simplified example): procedure <- function(a,b){ ... list(c,d) } now I want to use 'c' and 'd' in code as follows: d <- matrix(0,1,1) value <- procedure(a,b) and d[1,1] <- value[2] breaks te

[R] function return output

2009-01-16 Thread threshold
Hi, I wrote the function which outputs a matrix 'c' and a single value 'd', as follows (simplified example): procedure <- function(a,b){ ... list(c,d) } now I want to use 'c' and 'd' in code as follows: d <- matrix(0,1,1) value <- procedure(a,b) and d[1,1] <- value[2] breaks telling that: Error in