Re: [R] Question about - assignment

2009-07-02 Thread Kenn Konstabel
On Thu, Jul 2, 2009 at 4:34 AM, Rolf Turner r.tur...@auckland.ac.nz wrote: On 2/07/2009, at 12:20 PM, Hsiu-Khuern Tang wrote: Is this expected behavior? z - 1:5 z[1] - 0 Error in z[1] - 0 : object z not found The documentation seems to suggest that z will be found in the global

Re: [R] Question about - assignment

2009-07-02 Thread Duncan Murdoch
On 01/07/2009 8:20 PM, Hsiu-Khuern Tang wrote: Is this expected behavior? z - 1:5 z[1] - 0 Error in z[1] - 0 : object z not found The documentation seems to suggest that z will be found in the global environment and modified accordingly. z - 0 works as documented, it's the indexing that

Re: [R] Question about - assignment

2009-07-02 Thread Duncan Murdoch
On 01/07/2009 9:34 PM, Rolf Turner wrote: On 2/07/2009, at 12:20 PM, Hsiu-Khuern Tang wrote: Is this expected behavior? z - 1:5 z[1] - 0 Error in z[1] - 0 : object z not found The documentation seems to suggest that z will be found in the global environment and modified accordingly. I

Re: [R] Question about - assignment

2009-07-02 Thread Duncan Murdoch
On 7/2/2009 6:44 AM, Kenn Konstabel wrote: On Thu, Jul 2, 2009 at 4:34 AM, Rolf Turner r.tur...@auckland.ac.nz wrote: On 2/07/2009, at 12:20 PM, Hsiu-Khuern Tang wrote: Is this expected behavior? z - 1:5 z[1] - 0 Error in z[1] - 0 : object z not found The documentation seems to

Re: [R] Question about - assignment

2009-07-02 Thread Peter Dalgaard
Duncan Murdoch wrote: - doesn't need to find z. It will replace it if found, or create a new one if not. (Personally I would have limited that to the first case, i.e. it should fail if it doesn't find z.) Possibly. It's a holdover from S, where - assigns to the global environment

Re: [R] Question about - assignment

2009-07-02 Thread Duncan Murdoch
On 7/2/2009 9:46 AM, Peter Dalgaard wrote: Duncan Murdoch wrote: - doesn't need to find z. It will replace it if found, or create a new one if not. (Personally I would have limited that to the first case, i.e. it should fail if it doesn't find z.) Possibly. It's a holdover from S, where

[R] Question about - assignment

2009-07-01 Thread Hsiu-Khuern Tang
Is this expected behavior? z - 1:5 z[1] - 0 Error in z[1] - 0 : object z not found The documentation seems to suggest that z will be found in the global environment and modified accordingly. Best, Hsiu-Khuern. __ R-help@r-project.org mailing list

Re: [R] Question about - assignment

2009-07-01 Thread Rolf Turner
On 2/07/2009, at 12:20 PM, Hsiu-Khuern Tang wrote: Is this expected behavior? z - 1:5 z[1] - 0 Error in z[1] - 0 : object z not found The documentation seems to suggest that z will be found in the global environment and modified accordingly. I would agree that the documentation would