RWEP/SD/0_R实践课程/index.html

903 lines
34 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh-Hans"><head>
<script src="../../site_libs/clipboard/clipboard.min.js"></script>
<script src="../../site_libs/quarto-html/tabby.min.js"></script>
<script src="../../site_libs/quarto-html/popper.min.js"></script>
<script src="../../site_libs/quarto-html/tippy.umd.min.js"></script>
<link href="../../site_libs/quarto-html/tippy.css" rel="stylesheet">
<link href="../../site_libs/quarto-html/light-border.css" rel="stylesheet">
<link href="../../site_libs/quarto-html/quarto-syntax-highlighting-dark-31d8df3fb4b3ebd213a509f950828e75.css" rel="stylesheet" id="quarto-text-highlighting-styles"><meta charset="utf-8">
<meta name="generator" content="quarto-1.7.1">
<meta name="author" content="苏命、王为东 中国科学院大学资源与环境学院 中国科学院生态环境研究中心">
<meta name="dcterms.date" content="2025-03-19">
<title>Version: {{&lt; var branch &gt;}} 、R语言实践前篇</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="../../site_libs/revealjs/dist/reset.css">
<link rel="stylesheet" href="../../site_libs/revealjs/dist/reveal.css">
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
vertical-align: middle;
}
</style>
<link rel="stylesheet" href="../../site_libs/revealjs/dist/theme/quarto-5b48f34d633aed70c74c672477009ffc.css">
<link rel="stylesheet" href="./_extensions/inst/css/revealjs.css">
<link href="../../site_libs/revealjs/plugin/quarto-line-highlight/line-highlight.css" rel="stylesheet">
<link href="../../site_libs/revealjs/plugin/reveal-menu/menu.css" rel="stylesheet">
<link href="../../site_libs/revealjs/plugin/reveal-menu/quarto-menu.css" rel="stylesheet">
<link href="../../site_libs/revealjs/plugin/reveal-chalkboard/font-awesome/css/all.css" rel="stylesheet">
<link href="../../site_libs/revealjs/plugin/reveal-chalkboard/style.css" rel="stylesheet">
<link href="../../site_libs/revealjs/plugin/reveal-pointer/pointer.css" rel="stylesheet">
<link href="../../site_libs/revealjs/plugin/quarto-support/footer.css" rel="stylesheet">
<script type="application/json" class="js-hypothesis-config">
{
"theme": "clean",
"openSidebar": false
}
</script>
<script async="" src="https://hypothes.is/embed.js"></script>
<script>
window.document.addEventListener("DOMContentLoaded", function (_event) {
document.body.classList.add('hypothesis-enabled');
});
</script>
<style type="text/css">
.reveal div.sourceCode {
margin: 0;
overflow: auto;
}
.reveal div.hanging-indent {
margin-left: 1em;
text-indent: -1em;
}
.reveal .slide:not(.center) {
height: 100%;
}
.reveal .slide.scrollable {
overflow-y: auto;
}
.reveal .footnotes {
height: 100%;
overflow-y: auto;
}
.reveal .slide .absolute {
position: absolute;
display: block;
}
.reveal .footnotes ol {
counter-reset: ol;
list-style-type: none;
margin-left: 0;
}
.reveal .footnotes ol li:before {
counter-increment: ol;
content: counter(ol) ". ";
}
.reveal .footnotes ol li > p:first-child {
display: inline-block;
}
.reveal .slide ul,
.reveal .slide ol {
margin-bottom: 0.5em;
}
.reveal .slide ul li,
.reveal .slide ol li {
margin-top: 0.4em;
margin-bottom: 0.2em;
}
.reveal .slide ul[role="tablist"] li {
margin-bottom: 0;
}
.reveal .slide ul li > *:first-child,
.reveal .slide ol li > *:first-child {
margin-block-start: 0;
}
.reveal .slide ul li > *:last-child,
.reveal .slide ol li > *:last-child {
margin-block-end: 0;
}
.reveal .slide .columns:nth-child(3) {
margin-block-start: 0.8em;
}
.reveal blockquote {
box-shadow: none;
}
.reveal .tippy-content>* {
margin-top: 0.2em;
margin-bottom: 0.7em;
}
.reveal .tippy-content>*:last-child {
margin-bottom: 0.2em;
}
.reveal .slide > img.stretch.quarto-figure-center,
.reveal .slide > img.r-stretch.quarto-figure-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.reveal .slide > img.stretch.quarto-figure-left,
.reveal .slide > img.r-stretch.quarto-figure-left {
display: block;
margin-left: 0;
margin-right: auto;
}
.reveal .slide > img.stretch.quarto-figure-right,
.reveal .slide > img.r-stretch.quarto-figure-right {
display: block;
margin-left: auto;
margin-right: 0;
}
</style>
</head>
<body class="quarto-dark">
<div class="reveal">
<div class="slides">
<section id="title-slide" class="quarto-title-block center">
<h1 class="title">、R语言实践前篇</h1>
<p class="subtitle">《区域水环境污染数据分析实践》<br>Data analysis practice of regional water environment pollution</p>
<div class="quarto-title-authors">
<div class="quarto-title-author">
<div class="quarto-title-author-name">
苏命、王为东<br>中国科学院大学资源与环境学院<br>中国科学院生态环境研究中心
</div>
</div>
</div>
<p class="date">2025-03-19</p>
</section>
<section id="r语言实践部分课程简介" class="slide level2">
<h2>R语言实践部分课程简介</h2>
<p><strong>接下来的课程由我来带着大家一起学习、实践基于R语言的数据分析。</strong></p>
<h3 id="自我介绍">自我介绍</h3>
<ul>
<li>苏命:来自中国科学院生态环境研究中心</li>
<li>主要从事<strong>水源水质水生态</strong>方面的研究</li>
</ul>
<h3 id="课件">课件</h3>
<ul>
<li>采用<code>R语言</code>+<code>quarto</code>完成</li>
<li>网页公开:<a href="https://drc.drwater.net/course/public/RWEP/PUB/index.html">https://drc.drwater.net/course/public/RWEP/PUB/index.html</a></li>
<li>课件代码:<a href="https://git.drwater.net/course/RWEP.git">https://git.drwater.net/course/RWEP.git</a></li>
</ul>
</section>
<section id="如何学习接下来的内容" class="slide level2">
<h2>如何学习接下来的内容?</h2>
<ul>
<li>上课形式:
<ul>
<li><strong>实践操作为主</strong>目的是让每一位同学都能独立开展基于R的数据分析</li>
<li><strong>2-3人一组</strong>,自由分组,相互帮助</li>
</ul></li>
<li>准备工作:
<ul>
<li>个人笔记本电脑Microsoft Windows、GNU/Linux、MacOS系统</li>
<li>安装好<strong>Microsoft Excel</strong></li>
<li>能联网</li>
<li>如果电池不够用,建议带上插座</li>
</ul></li>
<li>上课规则
<ul>
<li>可随时打断,<strong>不懂就问</strong></li>
<li><strong>无特殊情况不迟到</strong>,否则操作过程容易跟不上</li>
</ul></li>
</ul>
</section>
<section id="rstudio-server使用" class="slide level2">
<h2>Rstudio Server使用</h2>
<ul>
<li>服务网址:<a href="https://rs1.drwater.net/">https://rs1.drwater.net/</a></li>
<li>每位同学使用1个账号随机生成</li>
<li>密码:****</li>
<li>后面的实践课程可在该服务器上完成</li>
</ul>
</section>
<section id="请记住自己的账号" class="slide level2">
<h2>请记住自己的账号!</h2>
<div>
</div>
<div class="quarto-layout-panel" data-layout-ncol="2">
<div class="quarto-layout-row">
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: center;">
<table class="caption-top">
<thead>
<tr class="header">
<th style="text-align: left;">uid</th>
<th style="text-align: left;">姓名</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">ruser01</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser02</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser03</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser04</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser05</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser06</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser07</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser08</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser09</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser10</td>
<td style="text-align: left;">XX</td>
</tr>
</tbody>
</table>
</div>
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: center;">
<table class="caption-top">
<thead>
<tr class="header">
<th style="text-align: left;">uid</th>
<th style="text-align: left;">姓名</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">ruser11</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser12</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser13</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser14</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser15</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser16</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser17</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser18</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser19</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser20</td>
<td style="text-align: left;">XX</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="请记住自己的账号-1" class="slide level2">
<h2>请记住自己的账号!</h2>
<div>
</div>
<div class="quarto-layout-panel" data-layout-ncol="2">
<div class="quarto-layout-row">
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: center;">
<table class="caption-top">
<thead>
<tr class="header">
<th style="text-align: left;">uid</th>
<th style="text-align: left;">姓名</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">ruser21</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser22</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser23</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser24</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser25</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser26</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser27</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser28</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser29</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser30</td>
<td style="text-align: left;">XX</td>
</tr>
</tbody>
</table>
</div>
<div class="quarto-layout-cell" style="flex-basis: 50.0%;justify-content: center;">
<table class="caption-top">
<thead>
<tr class="header">
<th style="text-align: left;">uid</th>
<th style="text-align: left;">姓名</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="text-align: left;">ruser31</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser32</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser33</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="even">
<td style="text-align: left;">ruser34</td>
<td style="text-align: left;">XX</td>
</tr>
<tr class="odd">
<td style="text-align: left;">ruser35</td>
<td style="text-align: left;">XX</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<section id="课后作业" class="slide level2">
<h2>课后作业</h2>
<p>提交形式:<code>第*次作业_姓名.qmd</code>文件</p>
<p>模板:</p>
<pre><code>---
title: "课后作业*"
author: 姓名
---
# 第1题
说明
::: {.cell}
```{.r .cell-code}
# Here is the code
```
:::
# 第2题
说明
::: {.cell}
```{.r .cell-code}
# Here is the code
```
:::
</code></pre>
</section>
<section id="欢迎讨论" class="slide level2 center">
<h2>欢迎讨论!</h2>
<span class="r-fit-text"><svg viewbox="0 0 576 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"></path> </svg><a href="https://drwater.net">苏命|https://drwater.net</a>; <svg viewbox="0 0 576 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 400H48V80h480v352zM208 256c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm-89.6 128h179.2c12.4 0 22.4-8.6 22.4-19.2v-19.2c0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6v19.2c0 10.6 10 19.2 22.4 19.2zM360 320h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8z"></path> </svg><a href="https://drwater.net/team/ming-su/">https://drwater.net/team/ming-su/</a>; <svg viewbox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"></path> </svg><a href="../">Slides</a></span><br><br>
<div class="columns">
<div class="column" style="width:30%;">
<span class="r-fit-text"><svg viewbox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z"></path> </svg><a href="mailto:mingsu@rcees.ac.cn">mingsu@rcees.ac.cn</a>;</span><br>
</div></div>
</section>
</div>
<div class="quarto-auto-generated-content" style="display: none;">
<p><img src="./_extensions/inst/img/ucaslogo.png" class="slide-logo"></p>
<div class="footer footer-default">
</div>
</div></div>
<script>window.backupDefine = window.define; window.define = undefined;</script>
<script src="../../site_libs/revealjs/dist/reveal.js"></script>
<!-- reveal.js plugins -->
<script src="../../site_libs/revealjs/plugin/quarto-line-highlight/line-highlight.js"></script>
<script src="../../site_libs/revealjs/plugin/pdf-export/pdfexport.js"></script>
<script src="../../site_libs/revealjs/plugin/reveal-menu/menu.js"></script>
<script src="../../site_libs/revealjs/plugin/reveal-menu/quarto-menu.js"></script>
<script src="../../site_libs/revealjs/plugin/reveal-chalkboard/plugin.js"></script>
<script src="../../site_libs/revealjs/plugin/reveal-pointer/pointer.js"></script>
<script src="../../site_libs/revealjs/plugin/quarto-support/support.js"></script>
<script src="../../site_libs/revealjs/plugin/notes/notes.js"></script>
<script src="../../site_libs/revealjs/plugin/search/search.js"></script>
<script src="../../site_libs/revealjs/plugin/zoom/zoom.js"></script>
<script src="../../site_libs/revealjs/plugin/math/math.js"></script>
<script>window.define = window.backupDefine; window.backupDefine = undefined;</script>
<script>
// Full list of configuration options available at:
// https://revealjs.com/config/
Reveal.initialize({
'controlsAuto': true,
'previewLinksAuto': true,
'pdfSeparateFragments': false,
'autoAnimateEasing': "ease",
'autoAnimateDuration': 1,
'autoAnimateUnmatched': true,
'jumpToSlide': true,
'menu': {"side":"left","useTextContentForMissingTitles":true,"markers":false,"loadIcons":false,"custom":[{"title":"Tools","icon":"<i class=\"fas fa-gear\"></i>","content":"<ul class=\"slide-menu-items\">\n<li class=\"slide-tool-item active\" data-item=\"0\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.fullscreen(event)\"><kbd>f</kbd> Fullscreen</a></li>\n<li class=\"slide-tool-item\" data-item=\"1\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.speakerMode(event)\"><kbd>s</kbd> Speaker View</a></li>\n<li class=\"slide-tool-item\" data-item=\"2\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.overview(event)\"><kbd>o</kbd> Slide Overview</a></li>\n<li class=\"slide-tool-item\" data-item=\"3\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.togglePdfExport(event)\"><kbd>e</kbd> PDF Export Mode</a></li>\n<li class=\"slide-tool-item\" data-item=\"4\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.toggleScrollView(event)\"><kbd>r</kbd> Scroll View Mode</a></li>\n<li class=\"slide-tool-item\" data-item=\"5\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.toggleChalkboard(event)\"><kbd>b</kbd> Toggle Chalkboard</a></li>\n<li class=\"slide-tool-item\" data-item=\"6\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.toggleNotesCanvas(event)\"><kbd>c</kbd> Toggle Notes Canvas</a></li>\n<li class=\"slide-tool-item\" data-item=\"7\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.downloadDrawings(event)\"><kbd>d</kbd> Download Drawings</a></li>\n<li class=\"slide-tool-item\" data-item=\"8\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.keyboardHelp(event)\"><kbd>?</kbd> Keyboard Help</a></li>\n</ul>"}],"openButton":true},
'chalkboard': {"buttons":true},
'pointer': {"key":"p","color":"#32cd32","pointerSize":18,"alwaysVisible":false},
'smaller': false,
// Display controls in the bottom right corner
controls: false,
// Help the user learn the controls by providing hints, for example by
// bouncing the down arrow when they first encounter a vertical slide
controlsTutorial: false,
// Determines where controls appear, "edges" or "bottom-right"
controlsLayout: 'edges',
// Visibility rule for backwards navigation arrows; "faded", "hidden"
// or "visible"
controlsBackArrows: 'faded',
// Display a presentation progress bar
progress: true,
// Display the page number of the current slide
slideNumber: 'c/t',
// 'all', 'print', or 'speaker'
showSlideNumber: 'all',
// Add the current slide number to the URL hash so that reloading the
// page/copying the URL will return you to the same slide
hash: true,
// Start with 1 for the hash rather than 0
hashOneBasedIndex: false,
// Flags if we should monitor the hash and change slides accordingly
respondToHashChanges: true,
// Push each slide change to the browser history
history: true,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Enable the slide overview mode
overview: true,
// Disables the default reveal.js slide layout (scaling and centering)
// so that you can use custom CSS layout
disableLayout: false,
// Vertical centering of slides
center: false,
// Enables touch navigation on devices with touch input
touch: true,
// Loop the presentation
loop: false,
// Change the presentation direction to be RTL
rtl: false,
// see https://revealjs.com/vertical-slides/#navigation-mode
navigationMode: 'linear',
// Randomizes the order of slides each time the presentation loads
shuffle: false,
// Turns fragments on and off globally
fragments: true,
// Flags whether to include the current fragment in the URL,
// so that reloading brings you to the same fragment position
fragmentInURL: false,
// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embedded: false,
// Flags if we should show a help overlay when the questionmark
// key is pressed
help: true,
// Flags if it should be possible to pause the presentation (blackout)
pause: true,
// Flags if speaker notes should be visible to all viewers
showNotes: false,
// Global override for autoplaying embedded media (null/true/false)
autoPlayMedia: null,
// Global override for preloading lazy-loaded iframes (null/true/false)
preloadIframes: null,
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
autoSlide: 0,
// Stop auto-sliding after user input
autoSlideStoppable: true,
// Use this method for navigation when auto-sliding
autoSlideMethod: null,
// Specify the average time in seconds that you think you will spend
// presenting each slide. This is used to show a pacing timer in the
// speaker view
defaultTiming: null,
// Enable slide navigation via mouse wheel
mouseWheel: false,
// The display mode that will be used to show slides
display: 'block',
// Hide cursor if inactive
hideInactiveCursor: true,
// Time before the cursor is hidden (in ms)
hideCursorTime: 5000,
// Opens links in an iframe preview overlay
previewLinks: false,
// Transition style (none/fade/slide/convex/concave/zoom)
transition: 'none',
// Transition speed (default/fast/slow)
transitionSpeed: 'default',
// Transition style for full page slide backgrounds
// (none/fade/slide/convex/concave/zoom)
backgroundTransition: 'none',
// Number of slides away from the current that are visible
viewDistance: 3,
// Number of slides away from the current that are visible on mobile
// devices. It is advisable to set this to a lower number than
// viewDistance in order to save resources.
mobileViewDistance: 2,
// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions. Can be
// specified using percentage units.
width: 1050,
height: 700,
// Factor of the display size that should remain empty around the content
margin: 0.1,
math: {
mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js',
config: 'TeX-AMS_HTML-full',
tex2jax: {
inlineMath: [['\\(','\\)']],
displayMath: [['\\[','\\]']],
balanceBraces: true,
processEscapes: false,
processRefs: true,
processEnvironments: true,
preview: 'TeX',
skipTags: ['script','noscript','style','textarea','pre','code'],
ignoreClass: 'tex2jax_ignore',
processClass: 'tex2jax_process'
},
},
// reveal.js plugins
plugins: [QuartoLineHighlight, PdfExport, RevealMenu, RevealChalkboard, RevealPointer, QuartoSupport,
RevealMath,
RevealNotes,
RevealSearch,
RevealZoom
]
});
</script>
<script>
// htmlwidgets need to know to resize themselves when slides are shown/hidden.
// Fire the "slideenter" event (handled by htmlwidgets.js) when the current
// slide changes (different for each slide format).
(function () {
// dispatch for htmlwidgets
function fireSlideEnter() {
const event = window.document.createEvent("Event");
event.initEvent("slideenter", true, true);
window.document.dispatchEvent(event);
}
function fireSlideChanged(previousSlide, currentSlide) {
fireSlideEnter();
// dispatch for shiny
if (window.jQuery) {
if (previousSlide) {
window.jQuery(previousSlide).trigger("hidden");
}
if (currentSlide) {
window.jQuery(currentSlide).trigger("shown");
}
}
}
// hookup for slidy
if (window.w3c_slidy) {
window.w3c_slidy.add_observer(function (slide_num) {
// slide_num starts at position 1
fireSlideChanged(null, w3c_slidy.slides[slide_num - 1]);
});
}
})();
</script>
<script id="quarto-html-after-body" type="application/javascript">
window.document.addEventListener("DOMContentLoaded", function (event) {
const toggleBodyColorMode = (bsSheetEl) => {
const mode = bsSheetEl.getAttribute("data-mode");
const bodyEl = window.document.querySelector("body");
if (mode === "dark") {
bodyEl.classList.add("quarto-dark");
bodyEl.classList.remove("quarto-light");
} else {
bodyEl.classList.add("quarto-light");
bodyEl.classList.remove("quarto-dark");
}
}
const toggleBodyColorPrimary = () => {
const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
if (bsSheetEl) {
toggleBodyColorMode(bsSheetEl);
}
}
toggleBodyColorPrimary();
const tabsets = window.document.querySelectorAll(".panel-tabset-tabby")
tabsets.forEach(function(tabset) {
const tabby = new Tabby('#' + tabset.id);
});
const isCodeAnnotation = (el) => {
for (const clz of el.classList) {
if (clz.startsWith('code-annotation-')) {
return true;
}
}
return false;
}
const onCopySuccess = function(e) {
// button target
const button = e.trigger;
// don't keep focus
button.blur();
// flash "checked"
button.classList.add('code-copy-button-checked');
var currentTitle = button.getAttribute("title");
button.setAttribute("title", "已复制");
let tooltip;
if (window.bootstrap) {
button.setAttribute("data-bs-toggle", "tooltip");
button.setAttribute("data-bs-placement", "left");
button.setAttribute("data-bs-title", "已复制");
tooltip = new bootstrap.Tooltip(button,
{ trigger: "manual",
customClass: "code-copy-button-tooltip",
offset: [0, -8]});
tooltip.show();
}
setTimeout(function() {
if (tooltip) {
tooltip.hide();
button.removeAttribute("data-bs-title");
button.removeAttribute("data-bs-toggle");
button.removeAttribute("data-bs-placement");
}
button.setAttribute("title", currentTitle);
button.classList.remove('code-copy-button-checked');
}, 1000);
// clear code selection
e.clearSelection();
}
const getTextToCopy = function(trigger) {
const codeEl = trigger.previousElementSibling.cloneNode(true);
for (const childEl of codeEl.children) {
if (isCodeAnnotation(childEl)) {
childEl.remove();
}
}
return codeEl.innerText;
}
const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', {
text: getTextToCopy
});
clipboard.on('success', onCopySuccess);
if (window.document.getElementById('quarto-embedded-source-code-modal')) {
const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', {
text: getTextToCopy,
container: window.document.getElementById('quarto-embedded-source-code-modal')
});
clipboardModal.on('success', onCopySuccess);
}
var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//);
var mailtoRegex = new RegExp(/^mailto:/);
var filterRegex = new RegExp("https:\/\/drc\.drwater\.net\/course\/public\/RWEP\/PUB");
var isInternal = (href) => {
return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href);
}
// Inspect non-navigation links and adorn them if external
var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)');
for (var i=0; i<links.length; i++) {
const link = links[i];
if (!isInternal(link.href)) {
// undo the damage that might have been done by quarto-nav.js in the case of
// links that we want to consider external
if (link.dataset.originalHref !== undefined) {
link.href = link.dataset.originalHref;
}
}
}
function tippyHover(el, contentFn, onTriggerFn, onUntriggerFn) {
const config = {
allowHTML: true,
maxWidth: 500,
delay: 100,
arrow: false,
appendTo: function(el) {
return el.closest('section.slide') || el.parentElement;
},
interactive: true,
interactiveBorder: 10,
theme: 'light-border',
placement: 'bottom-start',
};
if (contentFn) {
config.content = contentFn;
}
if (onTriggerFn) {
config.onTrigger = onTriggerFn;
}
if (onUntriggerFn) {
config.onUntrigger = onUntriggerFn;
}
config['offset'] = [0,0];
config['maxWidth'] = 700;
window.tippy(el, config);
}
const noterefs = window.document.querySelectorAll('a[role="doc-noteref"]');
for (var i=0; i<noterefs.length; i++) {
const ref = noterefs[i];
tippyHover(ref, function() {
// use id or data attribute instead here
let href = ref.getAttribute('data-footnote-href') || ref.getAttribute('href');
try { href = new URL(href).hash; } catch {}
const id = href.replace(/^#\/?/, "");
const note = window.document.getElementById(id);
if (note) {
return note.innerHTML;
} else {
return "";
}
});
}
const findCites = (el) => {
const parentEl = el.parentElement;
if (parentEl) {
const cites = parentEl.dataset.cites;
if (cites) {
return {
el,
cites: cites.split(' ')
};
} else {
return findCites(el.parentElement)
}
} else {
return undefined;
}
};
var bibliorefs = window.document.querySelectorAll('a[role="doc-biblioref"]');
for (var i=0; i<bibliorefs.length; i++) {
const ref = bibliorefs[i];
const citeInfo = findCites(ref);
if (citeInfo) {
tippyHover(citeInfo.el, function() {
var popup = window.document.createElement('div');
citeInfo.cites.forEach(function(cite) {
var citeDiv = window.document.createElement('div');
citeDiv.classList.add('hanging-indent');
citeDiv.classList.add('csl-entry');
var biblioDiv = window.document.getElementById('ref-' + cite);
if (biblioDiv) {
citeDiv.innerHTML = biblioDiv.innerHTML;
}
popup.appendChild(citeDiv);
});
return popup.innerHTML;
});
}
}
});
</script>
</body></html>