Best regards, Jeremie On Saturday, 16 Jan 2021 at 00:19, Berry, Charles" via "General discussions about Org-mode. wrote: >> On Jan 14, 2021, at 3:42 PM, Brett Presnell wrote: >> >> >> Probably a silly question, but in ob-R.el, what is the reason for >> setting na=\"nil\" when defining org-babel-R-write-object-command? Is >> this an elisp compatibility thing? >> > > I don't get it either. The value corresponding to the NA becomes a string in emacs-lisp whether \"nil\" or \"\" is used. > > So when passed to elisp via a :post header referencing an emacs-lisp src block, its treated as a string. > >> Regardless, I generally (always?) want na=\"\" for this, so I am finding >> all those "nil"s very annoying, and the only way that I see to defeat >> them is to redefine org-babel-R-write-object-command. >> >> If there is no reason for the current behavior (doubtful I know) and if >> I am not missing an obvious work-around, then I would like to suggest >> changing this behavior. Otherwise, would it be feasible to add an >> option for R code blocks (:nastring?) where one could specify the NA >> replacement string? >> >> What do you think? It's easy to suggest I know and certainly beyond my >> elisp coding skills at present, but I am supposing that someone more >> fluent in elisp could do this safely without too much trouble. >> > > You can use a :post header to customize outputs like this to make them more pleasing. Or just use your own `org-babel-R-write-object-command'. > > Adding another header arg qualifies as feature creep and in this case would require non-trivial work to implement. > > HTH, > > Chuck > -- Jeremie Juste