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

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to