Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

count equal values in a vector

# If index != 1 then you have multiple value for the same subject in your column
df %>%
  group_by(id,role) %>%
  mutate(index = n_distinct(role))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #count #equal #values #vector
ADD COMMENT
Topic
Name
5+5 =