我想在字符表达式
之间放置一个对象结果A<-2+2 # object
zlog #carácter expression I would like to insert the result of an object
所以它变成
z4log
答案 0 :(得分:2)
我建议:
A <- 2+2 # object
B <- "zlog" #carácter expression I would like to insert the result of an object
sub('(?<=.{1})', A, B, perl = TRUE)
根据@Pascal评论进行更正
T
替换为TRUE