vendredi 2 juin 2017

split vector into 3 columns depending on the cell value

Very basic questio, but not sure how to start:

I have generated 200 random values:

SE <- runif(200, 0, 0.65)

Out of this i would like to create 3 columns: se.sw, se.m and se.st that contain values from intervals [0,0.05], ]0.05, 0.35] and ]0.35, 0.65] respectively.

How can i acomplish this ?

I have tried using a nested ifelse function, but it didnt work. This seems like an easy problem that i am spending too much time with...

Aucun commentaire:

Enregistrer un commentaire