Error with RStudio source button

Hello,
after a short time I get everytime by pressing the "source" button the error:

Error in source("~/Documents/workspace...",  : 
  unused argument (echo = TRUE)

source-button

What can be happened there?
Thanks
Christian

ps
Windows 10, RStudio Version 1.2.1335 Build 1379 (f1ac3452), R version 3.5.2 (2018-12-20)

Could you reproduce the error and directly after it appears run
traceback()
in RStudio Console and post the result in here?

Hello thanks,
but I have found the error.
I have redefined the source -function with following code:

source <- function(f, encoding = 'UTF-8') {
    l <- readLines(f, encoding=encoding)
    eval(parse(text=l,),envir=.GlobalEnv)
}

And it seems that this has the result with the echo. Unfortunatly without echo.
I have some trouble with the encoding. With data from a german database I create a tex-file. But RStudio don't replace the german umlauts correctly and the latex processor produces oftenly errors. So I have found this code and it works in the most cases.
Any idea how I can source with the encoding option AND echo?

Thanks,
Christian

Hi @cosw!

This is more of an R question (rather than an RStudio IDE question), so I think it might get more knowledgeable responses if you open a new topic in General (or maybe R Markdown if that's a better fit — I can't quite tell from your description above). If you choose to go this route, make sure to include a title that's as informative as possible! :grin: Reproducible code illustrating your problem would also be very helpful.

Thanks, and you are right

Christian

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