github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

eusebe / ascii

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 1
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (4)
    • dev
    • gh-pages
    • master ✓
    • proto
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A R to ascii converter — Read more

  cancel

http://eusebe.github.com/ascii

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

add man for textile 
eusebe (author)
Fri Feb 05 13:51:39 -0800 2010
commit  39d180f935c9153cf294268088ffc2721686f50c
tree    5dc6a97eef5353d3b27c286e0c9094c9732ea254
parent  7125fb725ce0eca0e17d0939ddaca57715515227
ascii /
name age
history
message
file .Rbuildignore Loading commit data...
file .gitignore
file DESCRIPTION
file NAMESPACE
file NEWS
directory R/
file README.textile
file TODO
file conf.py
file help.r
file load.r
directory man/
README.textile

ascii

ascii is an R package that converts common R objects to asciidoc or txt2tags syntax.

It also provides a Sweave driver to embed the R code for complete data analyses in asciidoc or txt2tags documents (see Sweave function and R2HTML package).

example

(see http://eusebe.github.com/ascii)

> library(reshape)
> names(airquality) <- tolower(names(airquality))
> aqm <- melt(airquality, id=c("month", "day"), na.rm=TRUE)
> res <- cast(aqm, month ~ variable, mean, margins="grand_row")
> res
  month    ozone  solar.r      wind     temp
1     5 23.61538 181.2963 11.622581 65.54839
2     6 29.44444 190.1667 10.266667 79.10000
3     7 59.11538 216.4839  8.941935 83.90323
4     8 59.96154 171.8571  8.793548 83.96774
5     9 31.44828 167.4333 10.180000 76.90000
6 (all) 42.12931 185.9315  9.957516 77.88235

> ascii(res, caption = "A great table", footer = T, digits = 3, format = "e", decimal.mark = ",")
.A great table
[options="header,footer"]
|============================================= 
|month|ozone    |solar.r  |wind     |temp     
|5    |2,362e+01|1,813e+02|1,162e+01|6,555e+01
|6    |2,944e+01|1,902e+02|1,027e+01|7,910e+01
|7    |5,912e+01|2,165e+02|8,942e+00|8,390e+01
|8    |5,996e+01|1,719e+02|8,794e+00|8,397e+01
|9    |3,145e+01|1,674e+02|1,018e+01|7,690e+01
|(all)|4,213e+01|1,859e+02|9,958e+00|7,788e+01
|============================================= 
> print(ascii(res, caption = "A great table", footer = T, digits = 3, format = "e", decimal.mark = ","), "t2t")
=====A great table=====
|| month | ozone     | solar.r   | wind      | temp      |
| 5     | 2,362e+01 | 1,813e+02 | 1,162e+01 | 6,555e+01 |
| 6     | 2,944e+01 | 1,902e+02 | 1,027e+01 | 7,910e+01 |
| 7     | 5,912e+01 | 2,165e+02 | 8,942e+00 | 8,390e+01 |
| 8     | 5,996e+01 | 1,719e+02 | 8,794e+00 | 8,397e+01 |
| 9     | 3,145e+01 | 1,674e+02 | 1,018e+01 | 7,690e+01 |
|| (all) | 4,213e+01 | 1,859e+02 | 9,958e+00 | 7,788e+01 |
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server