3

think of a group of people aged from 21 to 35 years.

Then we can show the number of persons regarding gender and age groups 21-25, 26-30 and 31-35 in (at least) two different ways:

Type A

enter image description here

Type B

enter image description here

What I am curious about is what names are used to refer to those different types of table structures?

The practical relevance is that Excel can use Type A as a source for Pivot Tables but not Type B. Often though huge tables of type B are provided for statistics and I would like to google for 'How to turn Type B tables into Type A tables?'.


Terminology (summarized from answers):

  1. Type A:

    • R: 'long data format'
    • '(melted) cross tab
    • Excel: 'flat(tened) data table'
  2. Type B:

    • R: 'wide data format'
    • (traditional) cross tab

The search phrase for Excel/Pivot table would be 'how to flatten a cross table'.


Glen_b
  • 257,508
  • 32
  • 553
  • 939
Raffael
  • 1,424
  • 3
  • 18
  • 30

1 Answers1

3

I'm not sure there is a universally accepted terminology. At my work we call the first form a "melted cross tab", and the second form a "traditional cross tab". In the world of R and the reshape or reshape2 package they are called "long" and "wide" data formats - see eg this on R-bloggers.

And by the way if you are interested in converting one to another, I thoroughly recommend the melt() and acast() or dcast() functions in that R reshape2 environment.

Peter Ellis
  • 16,522
  • 1
  • 44
  • 82
  • this is very interesting and valuable information, thanks! – Raffael Nov 17 '12 at 21:06
  • 2
    @Яaffael1984, I can add to Peter's an alternative terminology. Type B is a 2-way crosstable. Type A is a 1-way table with nesting (age nested in gender). Type A is also frequently called "aggregated data" or aggregated type of tabulation. P.S. "Nesting" here is just a form of layout and not be confused with "nested experimental design" – ttnphns Nov 18 '12 at 09:13
  • sounds reasonable! though Type B is also aggregated technically. – Raffael Nov 18 '12 at 10:33