How to rename values in a column?

Under the column "sex" numbers are mentioned. I want to rename - "1" to "Male" and "0" to "Female".

[I am trying to make a pie chart of male vs female with percentage annotation. ]

Found it!

heart.df.unique$sex <- factor(heart.df.unique$sex)
levels(heart.df.unique$sex) <- c("Female", "Male")

# 1 is male and 0 is female, if you run only "levels(heart.df.unique$sex)" you'll understand the order of "c("Female", "Male")"