如何在RStudio中为此.html Markdown文档(包括图形)设置Ubuntu系列字体?
---
title: "Untitled"
author: "Me"
date: "23/10/2014"
output: html_document
---
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r}
summary(cars)
```
You can also embed plots, for example:
```{r, echo=FALSE}
plot(cars)
```
答案 0 :(得分:1)
对于整个文档,最简单的方法是使用基于Ubuntu字体的内置united
主题。将output: html_document
替换为:
output:
html_document:
theme: united
R Markdown不控制图形对象中使用的字体,因此您需要检查您选择的绘图库的文档(这里是guide for base R)。