TIA
--ram
Hi Ram,
No, there aren't any flags that do that, and it wouldn't be a good
idea. The main reason is that your code would become incompatible with
all other R users' code. Also, seeing as the language supports both
f.g and f_g as a function name, what would this flag do in the
situation where a user has defined is using both names, for different
functions? Such a flag would be inconsistent with the R language. The
function names in R are named what they are, and it's best to just
work with them. I do understand your discomfort. R supports a loose
style of object-oriented programming ("S3") in addition to a very
formal and restrictive one ("S4"). And periods *are* sometimes used in
R to make a sort of class.method structure name. But not always. R is
not C++ nor python nor java.
Note that one can simply assign an existing function definition to a
new variable name:
> f <- function(x) x
> g <- f
> g
function(x) x
so it would be possible to create a list of all functions in the
packages that you currently have loaded, and then traverse that list,
creating duplicate function definitions using underscores instead of
periods. But as indicated above, it would not be a good thing to do.
Dan
>
> TIA
> --ram