mercredi 20 février 2019

How to change column name based on the first three characters? (in R)

I am interested in modifying the column names of my data by keeping the first three characters (in R).

Currently my column names are something like this:

ALAD1_P1_R1

ALAJ3_P2_R3

CMBZ1_P1_R2

And I am seeking to obtain:

ALA

ALA

CMB

Aucun commentaire:

Enregistrer un commentaire