sortByNRepeated: Make a list of common occurances sorted by number of repeats
Description
The aim of this function is to count the number of occurances of words when comaring separate vectors (x, y and z) or from a list (given as x)
and to give an output sorted by their frequency.
The output lists the various values/words by their frequency, the names of the resulting list-elements indicate number of times the values/words were found repeated.
This function returns a list sorted by number of occurances. The names of the list indicate the number of repeats.
Arguments
x
(list, character or integer) main input, if list, arguments y and z will not be used
y
(character or integer) supplemental vector to comare with x
z
(character or integer) supplemental vector to comare with x
filterIntraRep
(logical) allow making vectors x, y and z unique before comparing (defaults to TRUE)
silent
(logical) suppress messages
debug
(logical) additional messages for debugging
callFrom
(character) allow easier tracking of messages produced
Details
In order to compare the frquency of values/words between separate vectors or vectors within a list, it is necessary that these have been made unique before calling this function or using filterIntraRep=TRUE.
In case the input is given as list (in x), there is no restriction to the number of vectors to be compared.
With very long lists, however, the computational effort incerases (like it does when using table)