VOOZH about

URL: https://www.geeksforgeeks.org/r-language/create-a-tabular-representation-of-data-in-r-programming-table-function/

⇱ Create a Tabular representation of Data in R Programming - table() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Create a Tabular representation of Data in R Programming - table() Function

Last Updated : 15 Jul, 2025
table() function in R Language is used to create a categorical representation of data with variable name and the frequency in the form of a table.
Syntax: table(x) Parameters: x: Object to be converted
Example 1: Output:
vec
1 2 3 4 
2 4 2 2 
Example 2: Output:
 Gender
Name Female Male
 abc 0 1
 cde 1 0
 def 0 1
Comment

Explore