"setdiff" operation getting reversed when using "categories" - Why??
Mostrar comentarios más antiguos
I have a table named "data" with one of the variables (categorical) being "Country". I am trying to merge all the categories that are not missing ("N/A") and after executing
land = setdiff(data.Country,"N/A")
in the workspace, "land" is a 9 x 1 categorical variable. This is perfect BUT when I execute
cats = categories(land)
"cats" becomes a 10 x 1 cell which includes the "N/A" that I got rid of using "setdiff" earlier.
WHY??
I want to use the "cats" in "mergecats(data.Country, cats, "Land")". Pls help.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Categorical Arrays en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!