[R] updating subset of data.frame

2009-11-29 Thread Rnewb
i have a data frame and a numeric vector indexed as a subset of the rows in the data.frame. what command can i use to assign the values in the vector to the appropriate rows of the data.frame? here's my failed attempt. what i would want is data[1,'z'] == 2, data[5,'z'] == -4, data[8,'z'] == -5,

Re: [R] updating subset of data.frame

2009-11-29 Thread Jorge Ivan Velez
Hi Rnewb, Take a look at ?"%in%" . HTH, Jorge On Sun, Nov 29, 2009 at 11:06 PM, Rnewb <> wrote: > > i have a data frame and a numeric vector indexed as a subset of the rows in > the data.frame. what command can i use to assign the values in the vector > to the appropriate rows of the data.fra

[R] updating subset of data.frame

2009-11-29 Thread Rnewb
i have a data frame and a numeric vector indexed as a subset of the rows in the data.frame. what command can i use to assign the values in the vector to the appropriate rows of the data.frame? here's my failed attempt. what i would want is data[1,'z'] == 2, data[5,'z'] == -4, data[8,'z'] == -5,