Answers for "how to count unique values in r"

R
0

how to count unique values in r

Get the unique values of the variable using unique().
Posted by: Guest on July-27-2021
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 unique values in r"

Browse Popular Code Answers by Language