How to get name of both axis for an element in a 2d table in R

68 Views Asked by At

lets say ive got this table:

print(thistable)

     axis1
axis2    1    2    3
   1  7584 9975 8187 
   2  8478 3624 4979

I want to get the names of each axis. Example: I want the names for element thistable[2]. What do i type to get something like: axis1:1, axis2:2? Normal names() dont work, and row.names() work only for one axis.

2

There are 2 best solutions below

0
On

I've figured an easy way of doing it is transforming the table to a dataframe and do get the indexes like I normally would

1
On

its very dificult without a script but you can try with names(thistable) to see the element of your database