Use paste(), which coerces non-character arguments into characters before concatenating them.
Andy > From: allan clark > > hi all > > > i have a simple question: > > lets assume that i can enter a variable (a) equal to some value, say > 100. obviously a could be any value. i would like to create a > plot with > a main heading as > hi all > > > "some writing" + a > > how would own create a string by combining a string with a numeric > variable? > > hope the question is not too confusing. > > e.g. say a=5 then i want something like plot(x, main="some > writing"+a) > > this obviously does not work since the syntax is incorrect. > > thankful for your replies. > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
