Hi all -- probably an easy question, but I can't seem to figure it out. I have one string variable composed of a number of names and would like to generate a new variable containing the most common name from the other variable.
So if var1 = "John John James John William Sam Sarah John"
I would like var2 to contain "John"
Any way to take the word mode from a single variable?
So if var1 = "John John James John William Sam Sarah John"
I would like var2 to contain "John"
Any way to take the word mode from a single variable?
Comment