lundi 6 mars 2017

In an R dataframe, if I want to change a column value to another value, but only if it equals 3 different things

I have a data frame in R called QCEW_County_Denominated. In this data frame I have a column called Industry. Whenever the value of this column is [31-33], [44-45], or [48-49] - actual values - not value ranges, I would like to change the value to 31, 44, and 48 respectively. Any advice on how to format this? If-then statements in R are my weakest point so I figured I'd ask here.

Aucun commentaire:

Enregistrer un commentaire