Re: [R] Question about a perceived irregularity in R syntax

2010-07-23 Thread Duncan Murdoch
Nordlund, Dan (DSHS/RDA) wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Peter Dalgaard Sent: Thursday, July 22, 2010 3:13 PM To: Pat Schmitz Cc: r-help@r-project.org Subject: Re: [R] Question about a perceived irregularity

Re: [R] Question about a perceived irregularity in R syntax

2010-07-23 Thread Duncan Murdoch
Subject: Re: [R] Question about a perceived irregularity in R syntax Pat Schmitz wrote: Both vector query's can select the values from the data.frame as written, however in the first form assigning a value to said selected numbers fails. Can you explain

[R] Question about a perceived irregularity in R syntax

2010-07-22 Thread Pat Schmitz
Both vector query's can select the values from the data.frame as written, however in the first form assigning a value to said selected numbers fails. Can you explain the reason this fails? dat - data.frame(index = 1:10, Value = c(1:4, NA, 6, NA, 8:10)) dat$Value[dat$Value == NA] - 1 #Why does

Re: [R] Question about a perceived irregularity in R syntax

2010-07-22 Thread Peter Dalgaard
Pat Schmitz wrote: Both vector query's can select the values from the data.frame as written, however in the first form assigning a value to said selected numbers fails. Can you explain the reason this fails? dat - data.frame(index = 1:10, Value = c(1:4, NA, 6, NA, 8:10))

Re: [R] Question about a perceived irregularity in R syntax

2010-07-22 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Peter Dalgaard Sent: Thursday, July 22, 2010 3:13 PM To: Pat Schmitz Cc: r-help@r-project.org Subject: Re: [R] Question about a perceived irregularity in R syntax Pat Schmitz