R: count number of distinct values in a vector
numbers <- c(4,23,4,23,5,43,54,56,657,67,67,435,
453,435,324,34,456,56,567,65,34,435)
a <- table(numbers)
a
a[names(a)==435]
as.data.frame(table(numbers))
sum(numbers == 435)
numbers <- c(4,23,4,23,5,43,54,56,657,67,67,435,
453,435,324,34,456,56,567,65,34,435)
a <- table(numbers)
a
a[names(a)==435]
as.data.frame(table(numbers))
sum(numbers == 435)