I have a function that works in ESS, but it fails if I include it in
an .Rmd file that I tried to knit using Rstudio.  I found advice at:
https://www.rstudio.com/products/rstudio/release-notes/debugging-with-rstudio/

It seems to be not referring to markdown files.  Somewhere else
suggested calling render() in the console pane.  I tried that.  The
browser() function interrupts correctly, but I can't find out what the
object zzz in the code below looks like.  Nothing prints the way it
would in a "normal" R buffer.

code outline:  making zzz out of two dataframes xx and yy

## 
    zzz <- NULL
    for(i in xx$Sample){
        raw.i <- <stuff> 

        etc. etc.

        zzz <- rbind(zzz, wide.i)
}
   browser()  

    names(zzz) <- c("Cultivar", "Test", "Change")
That line fails, with a complaint about zzz being NULL.

It appears as though the rbind doesn't do anything, but I can't see
what wide.i looks like to get an idea what could be the cause.  

Ideas what I should try are welcome.  I have no idea why the code
works in an R environment but not an Rmd one.


R-3.5.2, 
platform       x86_64-pc-linux-gnu         
arch           x86_64                      
os             linux-gnu                   
system         x86_64, linux-gnu           

Rstudio Version 1.1.383



-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___    Patrick Connolly   
 {~._.~}                   Great minds discuss ideas    
 _( Y )_                 Average minds discuss events 
(:_~*~_:)                  Small minds discuss people  
 (_)-(_)                              ..... Eleanor Roosevelt
          
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to