1

I'm running some code in a .Rmd file using M-n v u, but when I do so, my output is truncated. I'd like to turn this feature off, but the only documentation I can find mentioning truncation is for ess-eldoc-abbreviation-style and it's related to the mini-buffer.

Here's an example of what happens. Code

while(my.round <= max.round){

input.restart.file <- paste0(output.dir,"Restart/rstart.round.", my.round - 1, ".rst")
output.restart.file <- paste0(output.dir,"Restart/rstart.round.", my.round, ".rst")

    
if(my.round==1){ #initial set up
    ## Initialize parameter object
    ## Set initial phi value
    parameter <-
        initializeParameterObject(
        genome = genome,
        model = which.model,
        sphi = init_sphi,
        mutation.prior.mean = mutation.prior.mean,
        mutation.prior.sd = mutation.prior.sd, ## should try changing this
        num.mixtures = 1,
        gene.assignment = rep(1, genome.length),
        split.serine = TRUE,
        mixture.definition = mixDef)
    divergence.iteration <- initial.divergence
.
.
.

R Window in Emacs

+ while(my.round <= max.round){
+ 
+     input.restart.file <- paste0(output.dir,"Restart/rstart.round.", my.round - 1, ".rst")
+     output.restart.file <- paste0(output.dir,"Restart/rstart.round.", my.round, ".rst")
+ 
+     
+ if(my.round==1){ #initial set up
+     ## Initialize parameter object.... [TRUNCATED] 

UPDATE: I've now downloaded a copy of the emacs source code and searched for "[TRUNCATED]" and get nothing.

I've also searched my .emacs folders and get the same results.

For what it's worth, I'm running

  1. Ubuntu-Mate 20.04
  2. GNU Emacs 26.3
  • (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14) of 2020-03-26, modified by Debian
  1. ESS version 18.10.2
2
  • This option is likely from R, not from Emacs. Are you using knitr? It can be configured to do this. Nov 8, 2021 at 20:58
  • OMG! Thanks for pointing out this obvious alternative explanation! I am using knitr, but can't find any direct documentation on this. This posting about the Tinn-R console stackoverflow.com/a/55292384 suggests it is related to a source() command option max.deparse.length. I will investigate further. Nov 10, 2021 at 2:17

1 Answer 1

0

So it looks like I need to figure out how to modify the options ESS sends to R using source(). Specifically, I need to change

max.deparse.length: integer; is used only if ‘echo’ is ‘TRUE’ and gives
      the maximal number of characters output for the deparse of a
      single expression.

Now I know what to do, but I have no idea how to do this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.