r markdown displays "debug at" message

I have a r markdown file that reads plots and text from a series of existing files. The commands to read the files are included in a code chunk. In my code, "filemat" is a matrix of file path names leading to a temporary directory for the plots (stored as png) and latex kable tables, and plain text. The function "fixPath" expands the file path. The output is a PDF.

```{r smap, results="asis",eval=TRUE,echo=FALSE,warning=FALSE,message=FALSE,fig.align='center',out.width='80%',out.height='80%'}
    if("stats" %in% unlist(outChk)) {
      include_graphics(fixPath(filemat[5]))
   }
```
   

 ```{r stab, results="asis",eval=TRUE,echo=FALSE,warning=FALSE,message=FALSE}
   if("stats" %in% unlist(outChk)) {
      cat("The population base and trends of an area determine the needs for housing, schools, roads and other services.  The age, income, race and ethnicity, and migration of the population of a community are all vital in planning for service provision.  The most significant demographic transitions for Colorado and its communities are related to disparate growth, aging, downward pressure on income, and growing racial and ethnic diversity.")
      cat(dget(filemat[2]))
      cat(dget(filemat[3]))
   }

```

My issue is that with the execution of a chunk, each command is proceeded by a "debug at #" message that echos a command before it is executed. For example:

debug at #2: cat(β€œThe population base and trends of an area determine the needs for housing, schools, roads
and other services. The age, income, race and ethnicity, and migration of the population of a community are
all vital in planning for service provision. The most significant demographic transitions for Colorado and its
communities are related to disparate growth, aging, downward pressure on income, and growing racial and
ethnic diversity.”) The population base and trends of an area determine the needs for housing, schools, roads
and other services. The age, income, race and ethnicity, and migration of the population of a community are
1
all vital in planning for service provision. The most significant demographic transitions for Colorado and its
communities are related to disparate growth, aging, downward pressure on income, and growing racial and
ethnic diversity.

I have the "echo" chunk option set to "FALSE"
Any ideas why this is happening? Any suggestions for how to suppress the "debug at" messages?

TIA
AB

I found the issue. The r markdown report is created through a Shiny app. When I invoked the debugger in my shiny app, via "browser()" command, the debug statements were placed in the r markdown document. When I removed the browser() command, the debug statements went away.

Stupid computer tricks. :confused:
Cheers
AB

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.