Expanding slightly on Ista's answer, this may help if you are using Windows and want the symbol to appear in the console or in plots
> beta <- intToUtf8(0x03B2) # or intToUtf8(946) > a <- 0:9 > names(a) <- paste0(beta, a) > a β0 β1 β2 β3 β4 β5 β6 β7 β8 β9 0 1 2 3 4 5 6 7 8 9 > plot(0:9, 0:9, typ="n") > text(0:9, 0:9, names(a)) You just have to figure out the utf8 code for the symbol you want. Windows Character Map works for this and lets you insert the code directly as Ista did, or any of the various web pages listing the codes. ------------------------------------- David L Carlson Department of Anthropology Texas A&M University College Station, TX 77840-4352 -----Original Message----- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of John Sorkin Sent: Sunday, July 5, 2015 6:58 PM To: bgunter.4...@gmail.com; istaz...@gmail.com Cc: r-help@r-project.org Subject: Re: [R] Greek letters in column titles. To clarify, what I would like to do is have the letter b in the column titles below print as the Greek letter beta. dimnames(results) <- list(dimnames(results)[[1]],c("b0","SEb0","pb0","bRM0","SERMb0","pRMb0")) print(results) John John David Sorkin M.D., Ph.D. Professor of Medicine Chief, Biostatistics and Informatics University of Maryland School of Medicine Division of Gerontology and Geriatric Medicine Baltimore VA Medical Center 10 North Greene Street GRECC (BT/18/GR) Baltimore, MD 21201-1524 (Phone) 410-605-7119 (Fax) 410-605-7913 (Please call phone number above prior to faxing) >>> Bert Gunter <bgunter.4...@gmail.com> 07/05/15 5:07 PM >>> Warning: The following may be baloney, so confirmation or correction by those more knowledgeable is required. But maybe this will get you started/prove useful. Just beware. 1. First of all, as Ista said, this can be done, but it is heavily system dependent as to how. Basically I think you want access to UTF-8 encodings, which any modern OS should support, but that access is dependent on your system. 2. It also depends on where you want to display the results -- on screen, into a pdf, or ? . 3. See also The man pages on ?unicode and ?iconv , as these may also be relevant. Cheers, Bert Bert Gunter "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." -- Clifford Stoll On Sun, Jul 5, 2015 at 1:37 PM, Ista Zahn <istaz...@gmail.com> wrote: > x = data.frame( β =1) > > seems to work fine for me. Perhaps you need to give some more details about > what exactly the problem is. > > Best, > Ista > On Jul 5, 2015 3:36 PM, "John Sorkin" <jsor...@grecc.umaryland.edu> wrote: > >> I would like to include a Greek letter in a column title, viz. pB where B >> should be the Greek letter beta, but I don't know how to do this. I know >> about dimnames, but I don't know how to create the Greek letter. >> Thank you, >> John >> >> John David Sorkin M.D., Ph.D. >> Professor of Medicine >> Chief, Biostatistics and Informatics >> University of Maryland School of Medicine Division of Gerontology and >> Geriatric Medicine >> Baltimore VA Medical Center >> 10 North Greene Street >> GRECC (BT/18/GR) >> Baltimore, MD 21201-1524 >> (Phone) 410-605-7119410-605-7119 >> (Fax) 410-605-7913 (Please call phone number above prior to faxing) >> >> >> Confidentiality Statement: >> This email message, including any attachments, is for ...{{dropped:16}} > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. Call Send SMS Call from mobile Add to Skype You'll need Skype CreditFree via Skype Confidentiality Statement: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.