emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Jeremie Juste <jeremiejuste@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: R terminal output does not match src block output due to ">" character in results
Date: Sun, 16 Jan 2022 18:48:00 -0600	[thread overview]
Message-ID: <CA+M2ft9K+2-ANjeWf+1kx0JWg1o+qELimMg3BbUcjqLsJr7FsA@mail.gmail.com> (raw)
In-Reply-To: <877dazu7tl.fsf@gmail.com>

On Sun, Jan 16, 2022 at 7:30 AM Jeremie Juste <jeremiejuste@gmail.com> wrote:
>
> Hello John,
>
> As promised, I'm coming back about the formatting of  NA_characters_.
> In org-mode 9.5 NA_characters_ are not printed anymore with :results
> value. See example 2 and 3 for more details. Please let me know if
> this post solves your issues. Woudl updating to 9.5 be an option for
> you?
>
> Best regards,
> Jeremie
>

From our other thread, I *think* I'm already on 9.5? Re-pasting my
org-version answer here:

#+begin_quote
$ git log
commit 7fa8173282f85c2ca03cc7f51f28f6adfb250610 (HEAD -> master,
origin/master, origin/HEAD)
Author: Ian Martins <ianxm@jhu.edu>
Date:   Sat Jan 16 15:52:21 2021 -0500

But Mx-version:
Org mode version 9.4.4 (release_9.4.4-186-g7fa817.dirty @
/home/jwhendy/.elisp/org/lisp/)

So perhaps it appends the git commit to the system version?
#+end_quote

9.5 appears 4mos old... so I think I'm on it?
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/

I'll try the example later. I'd like for this to work for :results
output and :results value. I'm pretty sure I already explored :results
value and found it to work. One thing that confused me was why I
didn't get a header row with the org table coming from :results value?

Thanks for the help and I'll get back to you early this week to
confirm on the example below.


John

> #+BEGIN_SRC elisp
>    (org-version)
>   #+END_SRC
>
>   #+RESULTS:
>   : 9.5
>
> #+BEGIN_SRC elisp
>   (emacs-version)
> #+end_src
>
> #+RESULTS:
> : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24)
> :  of 2021-11-26
>
> * Example 1
> #+BEGIN_SRC R :results output
> data.frame(abc=NA_character_)
> #+end_src
>
> #+RESULTS:
> :    abc
> : 1 <NA>
>
> * Example 2
> #+BEGIN_SRC R :results value
> a <- data.frame(column1=NA_character_,column2=1:10)
> #+end_src
>
> #+RESULTS:
> |   |  1 |
> |   |  2 |
> |   |  3 |
> |   |  4 |
> |   |  5 |
> |   |  6 |
> |   |  7 |
> |   |  8 |
> |   |  9 |
> |   | 10 |
>
>
> * Example 3
> #+BEGIN_SRC R :results value :colnames yes
> library(RSQLite)
> con <- dbConnect(RSQLite::SQLite(), ":memory:")
>
> dbWriteTable(con, "df", data.frame(column1=NA_character_,column2=1:10))
> dbGetQuery(con, "SELECT * FROM df")
> #+end_src
>
> #+RESULTS:
> | column1 | column2 |
> |---------+---------|
> |         |       1 |
> |         |       2 |
> |         |       3 |
> |         |       4 |
> |         |       5 |
> |         |       6 |
> |         |       7 |
> |         |       8 |
> |         |       9 |
> |         |      10 |
>
>


  reply	other threads:[~2022-01-17  0:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 22:42 John Hendy
2022-01-11 23:30 ` John Hendy
2022-01-16 13:30   ` Jeremie Juste
2022-01-17  0:48     ` John Hendy [this message]
2022-01-24  4:49       ` Jack Kamm
2022-01-25 17:46         ` John Hendy

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=CA+M2ft9K+2-ANjeWf+1kx0JWg1o+qELimMg3BbUcjqLsJr7FsA@mail.gmail.com \
    --to=jw.hendy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jeremiejuste@gmail.com \
    --subject='Re: R terminal output does not match src block output due to ">" character in results' \
    /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

Code repositories for project(s) associated with this 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).