On Sun, Jan 16, 2022 at 7:30 AM Jeremie Juste <jeremieju...@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 <ia...@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 | > >