I have a data set where some observations are in cm and some are in inches. I need to convert all of the values to inches. The number is in one column and the unit is in another.
height unit
12.0 in
15.0 in
45.0 cm
13.0 in
52.0 cm
61.0 cm
and basically I just want all of them in inches. Should I use some kind of if statement, or subset the data where the unit is cm? Thanks for any help.