VOOZH about

URL: https://www.geeksforgeeks.org/r-language/convert-an-object-to-a-table-in-r-programming-as-table-function/

⇱ Convert an Object to a Table in R Programming - as.table() Function - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Convert an Object to a Table in R Programming - as.table() Function

Last Updated : 15 Jul, 2025
as.table() function in R Language is used to convert an object into a table.
Syntax: as.table(x) Parameters: x: Object to be converted
Example 1: Output:
A B C D E F G H I J 
2 4 3 1 2 3 2 1 4 2 
Example 2: Output:
 [, 1] [, 2] [, 3]
[1, ] 1 4 7
[2, ] 2 5 8
[3, ] 3 6 9
 A B C
A 1 4 7
B 2 5 8
C 3 6 9
Comment

Explore