emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: R terminal output does not match src block output due to ">" charact


From: Jeremie Juste
Subject: Re: R terminal output does not match src block output due to ">" character in results
Date: Sun, 16 Jan 2022 14:30:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

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



#+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 via email to

[Prev in Thread] Current Thread [Next in Thread]