Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

table() in 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  ^.^
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #R
ADD COMMENT
Topic
Name
2+2 =