emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vikas Rawal <vikaslists@agrarianresearch.org>
To: Jeremie Juste <jeremiejuste@gmail.com>,
	org-mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: NA in R source code block
Date: Sat, 31 Mar 2018 13:27:09 +0530	[thread overview]
Message-ID: <F082EC72-2220-45AA-9486-46179141E35B@agrarianresearch.org> (raw)
In-Reply-To: <87h8owlp0r.fsf@gmail.com>


> 
>> 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 |

  reply	other threads:[~2018-03-31  7:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-29 11:35 NA in R source code block Vikas Rawal
2018-03-31  6:47 ` Jeremie Juste
2018-03-31  7:57   ` Vikas Rawal [this message]
2018-03-31 12:37     ` Jeremie Juste
2018-03-31 12:43       ` Vikas Rawal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F082EC72-2220-45AA-9486-46179141E35B@agrarianresearch.org \
    --to=vikaslists@agrarianresearch.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=jeremiejuste@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).