I have a table with 2947 rows and 1 column containing only integer values in the range 1 to 30. I want to calculate the number of distinct values in that column. I used the for loop like this->
for(i in 1:2947)
which seems to work fine. How can I do it without using the for loop?