Is there a way to print text and variables on the same line in r
eg,
a="Hello" b="EKA" c="123456" print("$a !! my name is $b and my number is $c")
out put will be like this:
Hello !! my name is EKA and my number is 123456
I would suggest using the sprintf function. The advantage of this function is that the variables can be of any class (here c is numeric).
a="Hello" b="EKA" c=123456 sprintf("%s !! my name is %s and my number is %i", a, b, c)
print (paste ("You selected the following file name:", fileName)) will do the job