Quarto enables you to weave together content and executable code into a finished document.
To learn more about Quarto see https://quarto.org.
When you click the Render button a document will be generated that includes both content and the output of embedded code.
You can embed code like this:
[1] 10
Figure 1: 图标
mpg | cyl | disp | hp | drat | wt | qsec | vs | am | gear | carb |
|---|---|---|---|---|---|---|---|---|---|---|
21.0 | 6 | 160 | 110 | 3.90 | 2.620 | 16.46 | 0 | 1 | 4 | 4 |
21.0 | 6 | 160 | 110 | 3.90 | 2.875 | 17.02 | 0 | 1 | 4 | 4 |
22.8 | 4 | 108 | 93 | 3.85 | 2.320 | 18.61 | 1 | 1 | 4 | 1 |
21.4 | 6 | 258 | 110 | 3.08 | 3.215 | 19.44 | 1 | 0 | 3 | 1 |
18.7 | 8 | 360 | 175 | 3.15 | 3.440 | 17.02 | 0 | 0 | 3 | 2 |
18.1 | 6 | 225 | 105 | 2.76 | 3.460 | 20.22 | 1 | 0 | 3 | 1 |
?(caption)




library(showtext)
font_add("simhei", "C:/Users/speak/AppData/Local/Microsoft/Windows/Fonts/simhei.ttf")
showtext_auto()
# 绘制散点图
plot(data$x, data$y, col = "steelblue", pch = 16,
main = "二次多项式回归拟合", xlab = "x", ylab = "y")
# 添加拟合曲线
x_seq <- seq(min(data$x), max(data$x), length.out = 100)
y_pred <- predict(model, newdata = data.frame(x = x_seq))
lines(x_seq, y_pred, col = "red", lwd = 2)
# 添加图例和方程
legend("topleft",
legend = c("数据点", paste("拟合曲线: y =",
round(coef(model)[1], 2), "+",
round(coef(model)[2], 2), "x²")),
col = c("steelblue", "red"), pch = c(16, NA), lty = c(NA, 1))
Caution
It only prints first Tab on PDF.
column 1 111111111111 111111111111 111111111111 111111111111 111111111111 111111111111
column 2 222222222222 222222222222 222222222222 222222222222 222222222222 222222222222
column 3 333333333333 333333333333 333333333333 333333333333 333333333333 333333333333
column 4 444444444444 444444444444 444444444444 444444444444 444444444444 444444444444
From Zayn