I have a field with strings and I want to calculate the amount of distinctly different characters that appear in the strings. For instance
rabbit - 5
Fox - 3
TabbYCaT - 5
Raptor - 6
I'd considered splitting every word and doing something like len(values()) but surely there is a more efficient way.
Here is one way to do it:
| makeresults
| eval album="abacab"
| makemv tokenizer="(.)" album
| eval album=mvdedup(album)
| eval c=mvcount(album)
This returns 3, which is the number of unique characters in the field named "album".
Hi
Try this
| makeresults
| eval test="rabbit,Fox,TabbYCaT,Raptor" |makemv delim="," test|mvexpand test
| eval result = mvcount(mvdedup(split(test,"")))
Here is one way to do it:
| makeresults
| eval album="abacab"
| makemv tokenizer="(.)" album
| eval album=mvdedup(album)
| eval c=mvcount(album)
This returns 3, which is the number of unique characters in the field named "album".