[R] displaying column numbers when listing structure of an object

J. Pedro Granadeiro jpgranadeiro at fc.ul.pt
Mon May 17 19:24:09 CEST 2004


Dear R helpers,

Is there any simple way to display the column(s) numbers(s) when listing the 
structure of objects (especially for objects with large number of columns)?

Example on a data.frame:

 str(data.frame(v1=c(1:10),v2=(11:20)))
`data.frame':   10 obs. of  2 variables:
1.. $ v1: int  1 2 3 4 5 6 7 8 9 10
2.. $ v2: int  11 12 13 14 15 16 17 18 19 20

I checked the examples in ?str and the searchable mail archives, and made 
several attempts with "indent.str", but it was hopeless...

Thank you.

José Pedro Granadeiro




More information about the R-help mailing list