filterGroups {psichomics} | R Documentation |
Groups containing a number of non-missing values less than the threshold are discarded.
filterGroups(vector, group, threshold = 1)
vector |
Unnamed elements |
group |
Character: group of the elements |
threshold |
Integer: number of valid non-missing values by group |
Named vector with filtered elements from valid groups. The group of the respective element is given in the name.
# Removes groups with less than two elements filterGroups(1:4, c("A", "B", "B", "D"), threshold=2)