jeudi 17 août 2017

How to replace a column in a row with the latest row having specific condition on that column in R?

I am trying to apply a function to all rows of a dataframe. I basically will check different conditions in columns a and b of a row and try to replace the value of column c with the latest previous row which had similare conditions. I ahve been trying to figure out how to do so but unfortunately no luck so far. I appreciate if anyone can help me.

Thanks

Aucun commentaire:

Enregistrer un commentaire