From mboxrd@z Thu Jan 1 00:00:00 1970 From: david.hajage@curie.net Subject: [babel] ascii package Date: Mon, 10 May 2010 13:47:16 +0200 Message-ID: <1668ca$lt89@mail.curie.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1073231225==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OBRSA-00077Q-Oj for emacs-orgmode@gnu.org; Mon, 10 May 2010 07:47:18 -0400 Received: from [140.186.70.92] (port=56917 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBRS4-000779-IX for emacs-orgmode@gnu.org; Mon, 10 May 2010 07:47:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBRRy-0000r8-JF for emacs-orgmode@gnu.org; Mon, 10 May 2010 07:47:12 -0400 Received: from sirocco.curie.net ([193.51.7.16]:43098) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBRRy-0000qW-5p for emacs-orgmode@gnu.org; Mon, 10 May 2010 07:47:06 -0400 MIME-Version: 1.0 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============1073231225== MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_alternative 0040C0CBC125771F_=" --=_alternative 0040C0CBC125771F_= Content-Type: text/plain; charset="US-ASCII" Hello, I am developping a R package named ascii (available on CRAN). It can produce org markup from several class of R object. I think this could be usefull for some org/R users (with ':results org'), and so that it could be mentioned in the "Tips for usage", just after "LaTeX code from R" on this page: http://orgmode.org/worg/org-contrib/babel/languages/org-babel-doc-R.php#sec-4 Thank you very much for your attention. David Hajage PS - a working example: > library(ascii) > options(asciiType = "org") > x <- rnorm(100) > y <- x + rnorm(100) > ascii(summary(lm(y ~ x))) | | Estimate | Std. Error | t value | Pr(>\|t\|) | |-------------+----------+------------+---------+--------------| | (Intercept) | -0.0679 | 0.1038 | -0.6543 | 0.5144 | | x | 0.9899 | 0.1056 | 9.3744 | 0.0000 | > library(Hmisc) > ascii(describe(esoph)) #+CAPTION: esoph - 5 Variable - 88 Observations *agegp* | n | missing | unique | | 88 | 0 | 6 | | | 25-34 | 35-44 | 45-54 | 55-64 | 65-74 | 75+ | | Frequency | 15 | 15 | 16 | 16 | 15 | 11 | | % | 17 | 17 | 18 | 18 | 17 | 12 | *alcgp* | n | missing | unique | | 88 | 0 | 4 | 0-39g/day (23, 26%), 40-79 (23, 26%), 80-119 (21, 24%), 120+ (21, 24%) *tobgp* | n | missing | unique | | 88 | 0 | 4 | 0-9g/day (24, 27%), 10-19 (24, 27%), 20-29 (20, 23%), 30+ (20, 23%) *ncases* | n | missing | unique | Mean | .05 | .10 | .25 | .50 | .75 | .90 | .95 | | 88 | 0 | 10 | 2.273 | 0.0 | 0.0 | 0.0 | 1.0 | 4.0 | 5.3 | 6.0 | | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 17 | | Frequency | 29 | 16 | 11 | 9 | 8 | 6 | 5 | 1 | 2 | 1 | | % | 33 | 18 | 12 | 10 | 9 | 7 | 6 | 1 | 2 | 1 | *ncontrols* | n | missing | unique | Mean | .05 | .10 | .25 | .50 | .75 | .90 | .95 | | 88 | 0 | 30 | 11.08 | 1.0 | 1.0 | 3.0 | 6.0 | 14.0 | 29.1 | 40.0 | lowest: 1 2 3 4 5, highest: 40 46 48 49 60 --=_alternative 0040C0CBC125771F_= Content-Type: text/html; charset="US-ASCII"
Hello,

I am developping a R package named ascii (available on CRAN). It can produce org markup from several class of R object.
I think this could be usefull for some org/R users (with ':results org'), and so that it could be mentioned in the "Tips for usage", just after "LaTeX code from R" on this page: http://orgmode.org/worg/org-contrib/babel/languages/org-babel-doc-R.php#sec-4

Thank you very much for your attention.

David Hajage

PS - a working example:

> library(ascii)
> options(asciiType = "org")
> x <- rnorm(100)
> y <- x + rnorm(100)
> ascii(summary(lm(y ~ x)))
|             | Estimate | Std. Error | t value | Pr(>\|t\|)   |
|-------------+----------+------------+---------+--------------|
| (Intercept) | -0.0679  | 0.1038     | -0.6543 | 0.5144       |
| x           | 0.9899   | 0.1056     | 9.3744  | 0.0000       |
> library(Hmisc)
> ascii(describe(esoph))
#+CAPTION: esoph
- 5 Variable
- 88 Observations

*agegp*
| n  | missing | unique |
| 88 | 0       | 6      |

|           | 25-34 | 35-44 | 45-54 | 55-64 | 65-74 | 75+ |
| Frequency | 15    | 15    | 16    | 16    | 15    | 11  |
| %         | 17    | 17    | 18    | 18    | 17    | 12  |

*alcgp*
| n  | missing | unique |
| 88 | 0       | 4      |

 0-39g/day (23, 26%), 40-79 (23, 26%), 80-119 (21, 24%), 120+ (21, 24%)

*tobgp*
| n  | missing | unique |
| 88 | 0       | 4      |

 0-9g/day (24, 27%), 10-19 (24, 27%), 20-29 (20, 23%), 30+ (20, 23%)

*ncases*
| n  | missing | unique | Mean  | .05 | .10 | .25 | .50 | .75 | .90 | .95 |
| 88 | 0       | 10     | 2.273 | 0.0 | 0.0 | 0.0 | 1.0 | 4.0 | 5.3 | 6.0 |

|           | 0  | 1  | 2  | 3  | 4 | 5 | 6 | 8 | 9 | 17 |
| Frequency | 29 | 16 | 11 | 9  | 8 | 6 | 5 | 1 | 2 | 1  |
| %         | 33 | 18 | 12 | 10 | 9 | 7 | 6 | 1 | 2 | 1  |

*ncontrols*
| n  | missing | unique | Mean  | .05 | .10 | .25 | .50 | .75  | .90  | .95  |
| 88 | 0       | 30     | 11.08 | 1.0 | 1.0 | 3.0 | 6.0 | 14.0 | 29.1 | 40.0 |

 lowest:  1  2  3  4  5, highest: 40 46 48 49 60
--=_alternative 0040C0CBC125771F_=-- --===============1073231225== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline L'int=C3=A9grit=C3=A9 de ce message n'=C3=A9tant pas assur=C3=A9e sur Inter= net, l'Institut Curie ne peut =C3=AAtre tenu responsable de son contenu. = Si vous n'=C3=AAtes pas destinataire de ce message confidentiel, merci de l= e d=C3=A9truire et d'avertir imm=C3=A9diatement l'exp=C3=A9diteur. Afin de contribuer au respect de l'environnement, merci de n'imprimer ce ma= il qu'en cas de n=C3=A9cessit=C3=A9. --===============1073231225== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1073231225==--