Basically the function where you add a variable inside a string like the JavaScript template literals:
var str = "This is a sample";
print(`So you load the string in with ${str}, and it would insert the string without going "string" + var + "string" or using the paste() function in r, so I need help`)
overall I just need a simple function that would make my life easier with R instead of going like:
str <- "STRING"
print(paste("this is very annoying to do to require a", str, "so i need simpler options", sep="", collape=NULL))
I tried checking for easy stuff but it takes too long, like
paste(string1, var, string2, collapse = NULL) and stuff but its just too annoying and
would be simpler with str ${var} str
I think
str_glueis what you're looking for.Created on 2024-02-28 with reprex v2.0.2