[R] X11 font

Therneau, Terry M., Ph.D. therne@u @end|ng |rom m@yo@edu
Wed Aug 16 23:08:57 CEST 2023


I get the following error out of R, on a newer Ubuntu installation.

Error in `axis()`:
! X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 12 could not be loaded
Backtrace:
  1. graphics::matplot(...)
  3. graphics::plot.default(...)
  4. graphics (local) localAxis(...)
  6. graphics:::Axis.default(...)
  7. graphics::axis(side = side, at = at, labels = labels, ...)

The context is pretty simple:

library(survival)
matplot(60:100, 36525* survexp.us[61:101, 1:2, "2014"], col=2:1, lty=1, lwd=2,
     xlab="Age", ylab="Death rate per 100", log='y', type='l', yaxt='n',
     main="US Death Rates")
axis(2, c(1,2,5,10,20, 50), c(1,2,5,10, 20, 50), las=2)

This code works fine on my screen.   The error comes up when I put it into an .Rmd file 
and apply rmarkdown::render() to it.

Likely some font file is needed, but what one?

Terry

Version:
R Under development (unstable) (2023-08-01 r84818) -- "Unsuffered Consequences"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: aarch64-unknown-linux-gnu

-- 
Terry M Therneau, PhD
Department of Quantitative Health Sciences
Mayo Clinic
therneau using mayo.edu

"TERR-ree THUR-noh"

	[[alternative HTML version deleted]]



More information about the R-help mailing list