In R, how to count the number of times a value x appears in the vector?

1.0K    Asked by NishimuraAsato in Data Science , Asked on Nov 3, 2019
Answered by Nishimura Asato

Let us assume the following vector

count_list <- c(4,23,4,23,5,43,54,56,657,67,67,435, 453,435,324,34,456,56,567,65,34,435)

To get the count of the number we can use table() function

a <- table(count_list)

a

b6e8076cb0df4263f8571ceaf048d812


Your Answer

Interviews

Parent Categories