search for: sum_negt

Displaying 1 result from an estimated 1 matches for "sum_negt".

2010 Jul 14
1
rows process in DF
...0.5 0.6 -0.9 -0.8 2 101 0.3 0.4 0.5 0.6 -0.2 -0.4 -0.5 -0.6 what I am trying to accomplish: loop through the rows && do the following: if the values from the columns of the current row >0 then sum_positive=total if the values from the columns of the current row <0 then sum_negtive=total then discard the columns and create a new table id sum_positive sum_negtive 1 100 1.8 -2.2 2 101 1.8 -1.7 I tried the following:but didn't make it work, any inputs would be greatly appreciated. for (i in 1:nrow(myDF)) { + myro...