vendredi 12 novembre 2021

If function - replace by a formula

On R: I have a dataset of 150 000 obs. of 645 variables. I need to convert all negative value of the dataset (645 columns) by a formula. Like: if value positive, stay the same AND if its negative i want to apply this formula (value *-1)/2

Any clue to help me? Tks

Aucun commentaire:

Enregistrer un commentaire