[R] font family 'symbol'

R Help rhelp.stats at gmail.com
Wed Sep 26 18:07:38 CEST 2007


Hello List,

I'm building a package for R, and I want to use the font family
'symbol', because it seems to be the most consistent of the four font
families that par guarantees.  The problem is that when I tried to run
it on a different machine, I got an X11 error message saying that that
font family was not available.

What I would like to do, therefore, is do a check at the beginning of
the programs to check if the 'symbol' family will work, and use the
default font family if it will not.  I figured I could do it with
either require() or tryCatch() but I can't seem to get either of them
to do it.  If anyone has any idea how to check for the presence of
font families could they please let me know?

#####Sample code
if(HERE IS WHERE THE CHECK FOR 'symbol' WOULD GO){
    fam = 'symbol'
}
else{
    fam = ''
}
par(family=fam)
#####

Thanks,
Sam



More information about the R-help mailing list