Masking "cat" causes error on another machine

Hello,

I have a project that masks the base function "cat" with my own function "log":

cat <- function(...) {
  log(...)
}

On one machine that works fine. On another machine (same R version, same - because shared via renv - library) I get

Error in log(...) : unused argument (file = scratchFile)

Googling for "R scratchFile" doesn't show any useful results. So I do not know where "scratchFile" is coming from.

Has anyone an idea what the problem could be?

Use getAnywhere() to look for namespaces with log function on the troubled machine.

Output is the same on both machines:

2 differing objects matching ‘log’ were found
in the following places
  .my_env
  package:base
  namespace:base
Use [] to view one of them

.my_env is the enviroment where my log function is.

What kind of thing is passed in place of the dots?
How does your log function work, it has no named arguments ?

Both questions do not matter because I do not get the error when I use the function, I get it when I define it. The definition of the masked function happens in the .Rprofile file.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.