tbale () w r

# R Program to create 
# a tabular representation of data
  
# Creating a vector
vec = c(2, 4, 3, 1, 2, 3, 2, 1, 4, 2) 
  
# Calling table() Function
table(vec)

#Output:

# vec
# 1 2 3 4 
# 2 4 2 2 

#BY faycal elourrat  ^.^
Faycal EL OURRAT