Re: [R] function return

2010-07-22 Thread Daniel Hocking
Thank you so much! I think I had tried those two pieces separately and obviously had no success. I also typed panel3pt1.fn in the console without the () following it. On Jul 22, 2010, at 5:57 PM, David Winsemius wrote: On Jul 22, 2010, at 5:34 PM, David Winsemius wrote: On Jul 22, 2

Re: [R] function return

2010-07-22 Thread David Winsemius
On Jul 22, 2010, at 5:34 PM, David Winsemius wrote: On Jul 22, 2010, at 5:27 PM, Daniel Hocking wrote: I am sorry if this question is vague or uninformed. I am just learning R and struggling. I am using the book Hierarchical Modeling and Inference in Ecology and they provide examples of R

Re: [R] function return

2010-07-22 Thread David Winsemius
On Jul 22, 2010, at 5:27 PM, Daniel Hocking wrote: I am sorry if this question is vague or uninformed. I am just learning R and struggling. I am using the book Hierarchical Modeling and Inference in Ecology and they provide examples of R code. I have the following code from the book but when

[R] function return

2010-07-22 Thread Daniel Hocking
I am sorry if this question is vague or uninformed. I am just learning R and struggling. I am using the book Hierarchical Modeling and Inference in Ecology and they provide examples of R code. I have the following code from the book but when I run it I don't get any output. I cannot get

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