使用 RStudio 将 RMarkdown 编织为 HTML 时,是否可以直接在浏览器中查看,而不是在窗口中预览?

Del*_*aIV 6 html rstudio r-markdown

我经常使用大量数学的 RMarkdown 文档,例如:

---
title: "Just a test"
author: "Yours Truly"
date: '`r Sys.Date()`'
output:
  html_document:
    fig_caption: yes
---

```{r setup, include=FALSE}
library(knitr)
opts_chunk$set(echo  = FALSE,
               cache = TRUE,
               out.width = "75%", 
               fig.align = "center")
```

## Classical multiple linear regression
A common question in Data Science/Statistics is: how does a certain quantity $y$ depend on other quantities $x_1,\dots,x_p$? Generally, we are interested in $p(y|\mathbf{x})$, the conditional distribution of $y$ given $\mathbf{x}=(x_1,\dots,x_p)$. The simplest and perhaps most widely used model for $p(y|\mathbf{x})$ assumes that, given $\mathbf{x}$, $y$ is normally distributed, with a constant variance $\sigma^2$ and and mean which is a linear function of a parameter vector $\boldsymbol{\beta}=(\beta_0,\beta_1,\dots,\beta_k)$

$$\mathbb{E[y|\mathbf{x}]}=\boldsymbol{\beta}^T\cdot(1,\mathbf{x})=\beta_0+\sum_{j=1}^p\beta_jxj$$
Run Code Online (Sandbox Code Playgroud)

当我编织到 HTML 时,RStudio 会将其预览到一个窗口。要在浏览器中查看 HTML,请单击“在浏览器中查看”:

在此处输入图片说明

编织后没有办法直接在浏览器中查看HTML吗?