t...@tsdye.com (Thomas S. Dye) writes:
Or, fiddling a bit more.
#+name: luo
#+BEGIN_SRC R :results output raw
library(ascii)
df - data.frame(c1=123456789123456789000,c2=2)
df$c1 - as.vector(df$c1)
print(ascii(df,digits=c(0,0),include.rownames=F),type=org)
#+END_SRC
#+RESULTS:
Aloha Eric,
Eric Luo eric.we...@gmail.com writes:
Hi,
Why in the following code block, c1 was printed as scientific notation
rather then characters.
,
|
| #+BEGIN_SRC R :results value
| df - data.frame(c1=123456789123456789,c2=2)
| #+END_SRC
|
| #+RESULTS:
| |
t...@tsdye.com (Thomas S. Dye) writes:
Thanks, it's clear to me with the difference between value and
output now.
whether there is a way to tell emacs-lisp that 123456789123456789 is a
string rather than a number.
emacs-lisp handles the output as expected if the c1 has any character
other than
Hi Eric,
I don't know any way to do this in Org-mode. Here is a workaround in R
that might do what you want.
#+name: luo
#+BEGIN_SRC R :results output org
library(ascii)
df - data.frame(c1=123456789123456789000,c2=2)
df$c1 - as.vector(df$c1)
print(ascii(df),type=org)
#+END_SRC
Or, fiddling a bit more.
#+name: luo
#+BEGIN_SRC R :results output raw
library(ascii)
df - data.frame(c1=123456789123456789000,c2=2)
df$c1 - as.vector(df$c1)
print(ascii(df,digits=c(0,0),include.rownames=F),type=org)
#+END_SRC
#+RESULTS: luo
|c1 | c2 |