I am automating a R code for which I have to use make.names
function. Default behavior of make.names
function is fine with me but when my table name contains a "-", I want the table name to be different.
For example, current behavior :
> make.names("iris-ir")
[1] "iris.ir"
But I want it to modify only in the case when I have "-" present in table name:
> make.names("iris-ir")
[1] "iris_ir"
How can I achieve this? EDIT: using only builtin packages.