Alternative function to paste

前端 未结 5 1905
陌清茗
陌清茗 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

    I think you are looking for sprintf.

    Specifically:

    sprintf("Hi %s, Have a very nice %s!","Tom","day")
    

提交回复
热议问题