dimanche 22 octobre 2017

HOW TO CREATE A NEW COLUMN IN R USING IF-ELSE CONDITIONS

how can I create a new column in R using conditions? In fact, the problem is I can't figure out how to overcome the issue of having my data in an increasing-decreasing order (and I need this to be this way).

I have already done it in EXCEL but I need it done in R due to the fact I have plenty of points to statically analyze.

I have my data like this:

F1 T1 1 0,008499 2 6,493 3 8,72 4 10,95 5 13,08 4 15,31 3 17,53 2 19,76 1 24,12

and I need something like this:

C       F1    T1

increasing 1 0,008499 increasing 2 6,493 increasing 3 8,72 increasing 4 10,95 increasing 5 13,08 decreasing 4 15,31 decreasing 3 17,53 decreasing 2 19,76 decreasing 1 24,12

Aucun commentaire:

Enregistrer un commentaire