How to convert a variable with different formats into single unit?


I have variable name total_sqft ,with values in squarefoot, metersquare , Acres and perches,
can anyone help me what can i do to change unit into single unit for further analysis?


Assuming you have a means of distinguishing which values are in which unit, you should be able to convert them to your preferred unit by multiplying/dividing the "foreign" units by the appropriate coefficients (e.g. square feet to square meters, square feet to acres or vice versa – basically any unit conversion you could want can be found in various online unit-conversion calculators).

It sounds like the variable name right now is a bit of a misnomer. You should probably give it a name that doesn't imply that they're all in the same unit to avoid confusion.

See the Quick-R article for Creating new variables for how to do so using base R, or the dplyr::mutate() docs if you choose to do so in the tidyverse.