"setdiff" operation getting reversed when using "categories" - Why??
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Categorical Arrays dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!