Re: [R] Replace / swap values of subset of a data.frame

2009-05-19 Thread Gabor Grothendieck
If DF is your data frame: DF2 <- edit(DF) and then make the changes manually in the spreadsheet that pops up. On Tue, May 19, 2009 at 3:50 PM, tsunhin wong wrote: > Dear R users, > > I have 1 data.frame of 1500x80 - data1. I found out that there are a > few cells of data that I have misplace, a

Re: [R] Replace / swap values of subset of a data.frame

2009-05-19 Thread jim holtman
Exactly what are you trying to do? Are you trying to just change a subset of the values? 'subset' does not have an 'assignment' operator. Maybe you want something like this (but it is not clear from your description. Also it is not clear if you have exactly the same set of matching values in th

[R] Replace / swap values of subset of a data.frame

2009-05-19 Thread tsunhin wong
Dear R users, I have 1 data.frame of 1500x80 - data1. I found out that there are a few cells of data that I have misplace, and I need to fix the ordering of them. In an attempt trying to swap column 22 & 23 of the Subject with misplaced data, I did the following: > data2 <- data1 > subset(data1,(S