RE: [R] Character graphics

About this list Date view Thread view Subject view Author view Attachment view

From: Gabor Grothendieck (ggrothendieck@myway.com)
Date: Mon 08 Dec 2003 - 16:09:20 EST


Message-id: <20031208050920.73FE5399E@mprdmxin.myway.com>


I think you would have to roll your own or make use
of a second package. With the free Macanova package,
try this:

In R,

   write( x, file = "/temp.dat" ) # x is vector, e.g. x <- 1:20

In MacAnova,

   x <- vecread( "/temp.dat" )
   hist( x, freq:T, dumb:T, new:T, file:"/hist.out" )
   quit(F) # exit Macanova without prompting

If you are using the Windows version of Macanova you could even transfer
the data through the clipboard (replacing the write and read parts above with
write(x,file="clipboard") and vecread(string:CLIPBOARD) ). You could even
spawn Macanoava from R (system("macanowx -batch /hist.mac")) if you place
the Macanova commands in a file, hist.mac.

Here is the hist.out file:

                    Frequency histogram of vecread(string:CLIPBOARD)
           +---------------+--------------+---------------+---------------+---+
          4+..................................................................+
           |. . . . . .|
           |. . . . . .|
        3.5+. . . . . .+
           |. . . . . .|
          3+. . . . . .+
 F |. . . . . .|
 r |. . . . . .|
 e 2.5+. . . . . .+
 q |. . . . . .|
 u 2+. . . . . .+
 e |. . . . . .|
 n 1.5+. . . . . .+
 c |. . . . . .|
 y |. . . . . .|
          1+. . . . . .+
           |. . . . . .|
        0.5+. . . . . .+
           |. . . . . .|
          0+..................................................................+
           +---------------+--------------+---------------+---------------+---+
           0 5 10 15 20
                                vecread(string:CLIPBOARD)

---
Date: Mon, 08 Dec 2003 14:51:32 +1300 
From: Murray Jorgensen <maj@stats.waikato.ac.nz>
To: R-help <r-help@stat.math.ethz.ch> 
Subject: [R] Character graphics 

Does anyone else miss email-friendly character graphics such as the following example, produced using Minitab?

Histogram of C6 N = 478 N* = 21 Each * represents 2 observation(s)

Midpoint Count -12 16 ******** -11 53 *************************** -10 63 ******************************** -9 83 ****************************************** -8 93 *********************************************** -7 74 ************************************* -6 45 *********************** -5 13 ******* -4 6 *** -3 2 * -2 10 ***** -1 18 ********* 0 1 *

BTW, Minitab 13 protests when you want to do this:

MTB > gstd * NOTE * Character graphs are obsolete.

* NOTE * Standard Graphics are enabled. Professional Graphics are disabled. Use the GPRO command to enable Professional Graphics.

Has anyone tried to get similar unprofessional displays out of R?

Cheers, Murray

-- Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: maj@waikato.ac.nz Fax 7 838 4155 Phone +64 7 838 4773 wk +64 7 849 6486 home Mobile 021 1395 862

______________________________________________ R-help@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Thu 01 Jan 2004 - 09:20:55 EST