Skip to content
Prev 360550 / 398506 Next

How to print the frequency table (produced by the command "table" to Excel

Jim,

   Thanks for creating such a fantastic package "prettyR".
   I want to print the pretty frequency table (with row total and column
total) to an excel (or csv ) file. Is it possible?
A B Total
A 8 10 18
B 7 5 12
C 9 11 20
Total 24 26 50

   Two issues I encountered (See the attached csv file).
1. When I tried to print the above table to csv file, all elements on the
same row are printed in one cell.
2. If I write "delim.table(alpha tab)", the table is distorted (see
attached). Of course, I can adjust it manually but sometimes the number of
files is big.

    Thanks!

Miao
Crosstabulation of alpha1 by alpha2
alpha2
alpha1      A      B
A      8     10     18
   44.44  55.56      -
   33.33  38.46  36.00

B      7      5     12
   58.33  41.67      -
   29.17  19.23  24.00

C      9     11     20
      45     55      -
   37.50  42.31  40.00

      24     26     50
      48     52    100
alphatab

A B Total
A 8 10 18
B 7 5 12
C 9 11 20
Total 24 26 50
2016-04-26 16:14 GMT-07:00 Jim Lemon <drjimlemon at gmail.com>: