Answers for "how to count the number of unique values in a column in r"

0

how to count the number of unique values in a column in r

dummyData = rep(c(1,2, 2, 2), 25)

table(dummyData)
# dummyData
#  1  2 
# 25 75

## or another presentation of the same data
as.data.frame(table(dummyData))
#    dummyData Freq
#  1         1   25
#  2         2   75
Posted by: Guest on April-22-2021

Code answers related to "how to count the number of unique values in a column in r"

Browse Popular Code Answers by Language