I just started with R and RStudio so please consider me as a beginner .
I am running r 4.0.3 within rstudio on my laptop with ubuntu 20.04. I tried to use the ggpairs() function out of the GGally library and some parts of the plot can't be displayed. The value of the correlation shows strange artefacts instead of values (see picture). I tried this with the same r version and rstudio version on different Operating systems (windows10, popOS 20.04, linux mint 20) with no problems so i think this must have something to do with ubuntu 20.04. Maybe a dependency is missing, but hence there is no error raised I don't really know what to do next.
It would help to have a reproducible example :
However, that looks like a missing font or coding problem. Could you post the output of the sessionInfo() command here?
Hey, thanks for the quick response. I used the cars data, which is provided already in rstudio for this example. So the code is:
The output of the sessionInfo() is:
It works for me in the console.
My sessioninfo() is almost identical to yours except my locale is CA.UTF-8 as I am in Canada. AT.UTF-8 means Australia?
Are you working in the console or in a markdown document? I really suspect a missing or misspecified font but I am not sure how to check. I usually only see something like that when I open a Chinese document for which I do not have the correct font.
What happens if you run the code in the R-gui or even in the terminal.
AT stands for Austria
generally I'm working with RStudio and code within .R files.
I once made a markdown file also, there were no problems at all. After the knitting process, the pdf and all the outputs were correct.
This happens, when the graph is generated within RStudio or in the command line. No difference so far. Till now only the ggpairs()-function runs into this error. On Ubuntu there is no R-gui as far as I can tell. When I open R, it pops up within the terminal. As I wrote before, there is also the same issue. A missing font sounds plausible but I also don't know how to check that
I will do some looking around but I am out of my knowledge area. You might want to start a new post with a title "blah, blah, missing font ....GGally"
In any case it definitely looks like it is an R problem not an RStudio problem.
Any idea what the font was? IIRC, if it was a pdf output it should have been a Latex font unless you specified a font. If it was html I think it defaults to Helvehica in the text. But no idea what GGally uses as a default. You might want to e-mail the author or maintainer and ask.
I think R has a GUI, it does for me in Ubuntu 20.10. It should be in the list of applications.
Sorry I am not more help.
Thank you very much for your support! I did some searching now, and it seems that I at least found a work around solution. Seems like I'm not the only person with this problem.
I think I will live with the workaround:
Install the library showtext and call the function showtext_auto() at the beginning of the script:
library(showtext) showtext_auto() library(GGally) ggpairs(cars)
Thanks for your time and greetings from Austria
Great news. best wishes from Canada,
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.