Re: [R] Interpretation of 'swtich'

2010-03-08 Thread Duncan Murdoch
Duncan Murdoch wrote: On 07/03/2010 5:26 PM, rkevinbur...@charter.net wrote: Thatnk you. The documentation indicates as you indicated that if there is not an exact match then the next element is chosen. But it does not indicate the case that contains an exact match but there is not value t

Re: [R] Interpretation of 'swtich'

2010-03-07 Thread Duncan Murdoch
On 07/03/2010 5:26 PM, rkevinbur...@charter.net wrote: Thatnk you. The documentation indicates as you indicated that if there is not an exact match then the next element is chosen. But it does not indicate the case that contains an exact match but there is not value to be returned (=, case). F

Re: [R] Interpretation of 'swtich'

2010-03-07 Thread rkevinburton
Thatnk you. The documentation indicates as you indicated that if there is not an exact match then the next element is chosen. But it does not indicate the case that contains an exact match but there is not value to be returned (=, case). From what you indicate this is treated as if it was not a

Re: [R] Interpretation of 'swtich'

2010-03-07 Thread Uwe Ligges
On 06.03.2010 21:49, rkevinbur...@charter.net wrote: In browsing the source I see the following construct: res<- switch(type, working = , response = r, deviance = , pearson = if (is.null(object$weights)) r else r * sqrt(object$weights), partial = r) I under

[R] Interpretation of 'swtich'

2010-03-06 Thread rkevinburton
In browsing the source I see the following construct: res <- switch(type, working = , response = r, deviance = , pearson = if (is.null(object$weights)) r else r * sqrt(object$weights), partial = r) I understand that 'switch' will execute the code that is matched