Re: [R] Comparing values of different columns: Error: level sets of factors are different

2014-10-17 Thread David Winsemius
On Oct 17, 2014, at 1:21 PM, Chichi Shu wrote: > Hi, R listers, > I¡¯m trying to compare a value of a row in a column to values of previous > rows in another column in a loop. ¡°i¡± is just from first row to the last > row. j is an another looping controller indicating the rows that row[i] will

[R] Comparing values of different columns: Error: level sets of factors are different

2014-10-17 Thread Chichi Shu
Hi, R listers, I��m trying to compare a value of a row in a column to values of previous rows in another column in a loop. ��i�� is just from first row to the last row. j is an another looping controller indicating the rows that row[i] will be compared to and j will be rows before row[i]. I want