如何在R Telegram bot $ sendMessage中插入换行符

问题描述

我知道只要输入下一行就可以在电报消息中进行换行(示例1)。但是,我正在处理变量,需要使用粘贴功能来创建我的句子(示例2)。由于粘贴功能,我无法在电报消息中输入换行符。请帮忙!

示例1:

library(telegram)

msg <- "This is your message
and this is the 2nd line"

bot$sendMessage(msg)

enter image description here

示例2:

library(telegram)

x <- "123"

msg <- paste("This is your",x,"and this is the 2nd line")

bot$sendMessage(msg)

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)