Is there a way to label the "0"'s and "1"'s of my gender variable, as 'Female' and 'male' so that on plotting i get "gender=male" instead of gender=1. I would also be ok with Male and Female. I rarely work with R, so forgive my simple question.
I tried
gender2 = factor(gender2, levels = c("Female", "male")
but it gave me an error. it also made me uncomfortable that i couldn't specify the values for the ordering so make sure female is for coding 0 and male for coding 1.