Column Names with R plugin

ChristianW
ChristianW Member
edited March 2023 in R & Python Tiles

Hello,

 

I am using the R plugin and noticed that all the attributes (column names) from my source which contain spaces are replaced with a "." in R. (i.e. "Prod. Name" -> "Prod..Name")

 

Is there a way to avoid this behavior? I know that I could change the names again in R but this becomes really challenging and time-consuming when you have over 300 columns and, replacing the dots as my example above, makes it extra complicated (I don't want to get into regex for this...). It is really important to me that the column names that I am sending back to Domo are the same as the source.

 

Thanks!

Tagged:

Comments

  • jimmy
    jimmy Member

    This will take care of the extra period: 

    names(data) <- stringr::str_replace(names(data), '\\.\\.', '.') 

    Is that issue with the DomoR package?