[email protected] (Thomas S. Dye) writes:
> library(ascii)
> ...
> print(ascii(table(data)), type="org")
Great tip. I even got the result out as an interpreted org table by
using ":results output raw". (For example, without "raw" it becomes
literal.) Thanks!
* interesting data
#+BEGIN_SRC R :exports results :results output raw
library (ascii)
org.files <- c (1, 0, 2, 2, 2, 2, 1)
happiness <- c (1, 0, 2, 2, 2, 1, 2)
data <- data.frame (org.files, happiness)
print (ascii (table (data)), type = "org")
#+END_SRC
#+RESULTS:
| | | *happiness* | | |
| | | 0 | 1 | 2 |
|-------------+---+-------------+------+------|
| *org.files* | 0 | 1.00 | 0.00 | 0.00 |
| | 1 | 0.00 | 1.00 | 1.00 |
| | 2 | 0.00 | 1.00 | 3.00 |
Jarmo