Join levels of a category

Hi,

I imported to R an excel file with the variable "marital status". This have 2 levels: with partner, without partner. However, R yet read the level "divorced". It was an old level of category and y recodified as "without partner", but R yet read it. I think that un strategy could be join levels. I don't know.

Hi, UrraP!

Have you checked if the excel file was saved after transforming all levels to "with partner" and "without partner" and before reading it into R?

If yes, could you post a reproducible example of your dataset in R?
Find more info below:
What's a reproducible example (reprex) and how do I do one?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.