3
$\begingroup$

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'.


$\endgroup$
3
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ this is very interesting and valuable information, thanks! $\endgroup$ – Raffael Nov 17 '12 at 21:06
  • 2
    $\begingroup$ @Я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" $\endgroup$ – ttnphns Nov 18 '12 at 9:13
  • $\begingroup$ sounds reasonable! though Type B is also aggregated technically. $\endgroup$ – Raffael Nov 18 '12 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.