Is there a way to print text and variable contents on the same line? For example,
wd <- getwd() print(\"Current working dir: \", wd)
I c
you can use paste0 or cat method to combine string with variable values in R
For Example:
paste0("Value of A : ", a) cat("Value of A : ", a)
You can use paste with print
paste
print
print(paste0("Current working dir: ", wd))
or cat
cat
cat("Current working dir: ", wd)