Using a Mac with latest updates installed. In R and R Studio, I'm getting this warning message:
1: In axis(side = side, at = at, labels = labels, ...) :
no font could be found for family "Arial"
I've seen discussions of this problem in the past, but I have not seen a fix.
Hi!
To help us help you, could you please prepare a repr oducible ex ample (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:
A minimal reproducible example consists of the following items:
A minimal dataset, necessary to reproduce the issue
The minimal runnable code necessary to reproduce the issue, which can be run
on the given dataset, and including the necessary information on the used packages.
Let's quickly go over each one of these with examples:
Minimal Dataset (Sample Data)
You need to provide a data frame that is small enough to be (reasonably) pasted on a post, but big enough to reproduce your issue.
Let's say, as an example, that you are working with the iris data frame
head(iris)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1 5.1 3.5 1.4 0.…
> plot(cars,
sub="Test",
xlab = "Speed (mph)",
ylab = "Stopping distance (ft)",
las = 1, xlim = c(0, 25))
There were 39 warnings (use warnings() to see them)
jasonbrownlee:
plot(cars, sub="Test", xlab = "Speed (mph)", ylab = "Stopping distance (ft)", las = 1, xlim = c(0, 25))
There were 39 warnings (use warnings() to see them)
When I run that code I don't have any errors or warnings (see reprex below).
The message;
is telling you that if you run warnings()
in your console, R will report what those warning messages are. Also note that warnings don't necessarily stop your code. For details; R: Warning Messages
plot(cars,
sub="Test",
xlab = "Speed (mph)",
ylab = "Stopping distance (ft)",
las = 1, xlim = c(0, 25))
Created on 2019-05-29 by the reprex package (v0.2.1)
Also note that this isn't a reprex. Here's a nice video that walks you through how to get that.
Reproducible examples are useful (if not essential) to diagnosing problems like this.
The problem has been solved.
For other Mac users who encounter this issue with R...
Go to Finder
Search for "Font Book" and open it.
Look for the Arial font and, if it is greyed out, turn it on.
This eliminates the warning and enables R to produce the appropriate labels.
If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:
If your question has been answered, don't forget to mark the solution!
How do I mark a solution?
Find the reply you want to mark as the solution and look for the row of small gray icons at the bottom of that reply. Click the one that looks like a box with a checkmark in it:
[image]
Hovering over the mark solution button shows the label, "Select if this reply solves the problem". If you don't see the mark solution button, try clicking the three dots button ( ••• ) to expand the full set of options.
When a solution is chosen, the icon turns green and the hover label changes to: "Unselect if this reply no longer solves the problem". Success!
[solution_reply_author]
…
Yes. Will do. Thanks.
I hope the answer helps others.
system
Closed
June 6, 2019, 6:17pm
8
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.