> >> NAs in a data frame that is created by an R source code block show up in the >> results as nil. Can I change it to something else (say, “—“)? > > Could you elaborate on your issue? Can you give a minimal example of > your block? It is very difficult to help with the information you gave. >
Hi and Greetings! And apologies if my previous mail sounded rude. That was surely not my intent. Here is an example. The NA in column a shows up in the results as nil. Why does that happen? Is there a way of changing this behaviour? I can manually replace NA with something else, but doing that in each code block is a pain. Since I wrote my first mail, I have written an export filter that filters out each “nil” at the time of export and replaces it with a “---“. But that is not perhaps the most efficient way of doing it. Warmly, Vikas ----------- #+NAME: test #+BEGIN_SRC R :results value :exports results :colnames yes :hline yes data.frame(a=c(1,2,NA),b=c("john","dan","marco")) #+END_SRC #+RESULTS: test | a | b | |-----+-------| | 1 | john | | 2 | dan | | nil | marco |