Alternative function to paste

前端 未结 5 1906
陌清茗
陌清茗 2021-02-04 03:43

Is there a function that can be an alternative to paste ? I would like to know if something like this exists in R:

> buildString ( \"Hi {1}, Have a very nice         


        
5条回答
  •  野性不改
    2021-02-04 04:08

    The whisker package does this very well, and deserves wider appreciation:

    require(whisker)
    whisker.render ( "Hi {{name}}, Have a very nice {{noun}} ! " , list(name="Tom", noun="day") )
    

提交回复
热议问题