Error in `sink()`: ! sink stack is full while trying to compile a report

I used "rmarkdown::render("myscrpt.R", "pdf_document")", the notebook icon and File -> compile report all get me the same error:

processing file: beardata6.spin.Rmd
Error in `sink()`:
! sink stack is full
Backtrace:
  1. rmarkdown::render("beardata6.R", "pdf_document")
  2. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  3. knitr:::process_file(text, output)
  6. knitr:::process_group(group)
  7. knitr:::call_block(x)
     ...
 12. knitr (local) evaluate(...)
 13. evaluate::evaluate(...)
 14. evaluate:::evaluate_call(...)
 15. evaluate:::watchout(debug)
 16. base::sink(con, split = debug)

I have tried "sink()" and sink.number() which is 0...
Does anybody have an idea how to fix this?
thanks!