Reputation: 1480
I would like to place an object result between a character expression
A<-2+2 # object
zlog #carácter expression I would like to insert the result of an object
So it becomes
z4log
Upvotes: 1
Views: 62
Reputation: 822
I would suggest:
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)
Correction is made according to @Pascal comment.
T
is replaced with TRUE
Upvotes: 2