adds more work based on chapter two

This commit is contained in:
2022-09-04 23:51:35 -07:00
parent f9340fd7aa
commit cac5ac9243
6 changed files with 710 additions and 152 deletions

View File

@@ -39,4 +39,4 @@ fake_news |>
) |>
filter(title_has_excl)
# suppose we get a new article that is titled
# suppose we get a new article that is titled

View File

@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.1.179">
<meta name="generator" content="quarto-1.1.189">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
@@ -100,6 +100,7 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js" type="text/javascript"></script>
<link rel="stylesheet" href="styles.css">
</head>
<body class="fullcontent">
@@ -135,8 +136,10 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="co"># libraries</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(bayesrules)</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(dplyr)</span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="fu">data</span>(fake_news)</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a>fake_news <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">as_tibble</span>(fake_news)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(tidyr)</span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(gt)</span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="fu">data</span>(fake_news)</span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a>fake_news <span class="ot">&lt;-</span> tibble<span class="sc">::</span><span class="fu">as_tibble</span>(fake_news)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>What is the proportion of news articles that were labeled fake vs real.</p>
<div class="cell">
@@ -192,7 +195,488 @@ $ text_syllables_per_word &lt;dbl&gt; 1.803653, 1.660118, 1.631579, 1.720149, 1.
<p>If we let <span class="math inline">\(B\)</span> be the event that a news article is “fake” news, and <span class="math inline">\(B^c\)</span> be the event that a news article is “real”, we can write the following:</p>
<p><span class="math display">\[P(B) = .4\]</span> <span class="math display">\[P(B^c) = .6\]</span></p>
<p>This is the first “clue” or set of data that we have to build into our framework. Namely, majority of articles are “real”, therefore we could simply predict that the new article is “real”. This updated sense or reality now becomes our priors.</p>
<p>Getting additional data, and updating our priors, based on additional data.</p>
<p>Getting additional data, and updating our priors, based on additional data. The new observation we make is the use of exclamation marks “!”. We note that the use of “!” is more frequent in news articles labeled as “fake”. We will want to incorporate this into our framework to decide whether the new incoming should be labelled as real or fake.</p>
<section id="likelihood" class="level3">
<h3 class="anchored" data-anchor-id="likelihood">Likelihood</h3>
<div class="callout-note callout callout-style-default no-icon callout-captioned">
<div class="callout-header d-flex align-content-center">
<div class="callout-icon-container">
<i class="callout-icon no-icon"></i>
</div>
<div class="callout-caption-container flex-fill">
Probability and Likelihood
</div>
</div>
<div class="callout-body-container callout-body">
<p>When the event <span class="math inline">\(B\)</span> is known, then we can evaluate the uncertainy of events <span class="math inline">\(A\)</span> and <span class="math inline">\(A^c\)</span> given <span class="math inline">\(B\)</span></p>
<p><span class="math display">\[P(A|B) \text{ vs } P(A^c|B)\]</span></p>
<p>If on the other hand, we know event <span class="math inline">\(A\)</span> then we can evaluate the relative compatability of data <span class="math inline">\(A\)</span> with <span class="math inline">\(B\)</span> and <span class="math inline">\(B^c\)</span> using likelihood functions</p>
<p><span class="math display">\[L(B|A) \text{ vs } L(B^c|A)\]</span> <span class="math display">\[=P(A|B) \text{ vs } P(A|B^c)\]</span></p>
</div>
</div>
<p>So in our case, we dont know whether this new incoming article is real or not, but we do know that the title has an exclamation mark. This means we can evaluate how likely this article is real or not given that it contains an “!” in the title using likelihood functions. We can formualte this as:</p>
<p><span class="math display">\[L(B|A) \text{ vs } L(B^c|A)\]</span></p>
<p>And perform the computation in R as follows:</p>
<div class="cell">
<div class="sourceCode cell-code" id="cb6"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="co"># if fake, what are the proprotions of ! vs no-!</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a>prop_of_excl_within_type <span class="ot">&lt;-</span> fake_news <span class="sc">|&gt;</span></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">group_by</span>(type, title_has_excl) <span class="sc">|&gt;</span></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">summarise</span>(</span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a> <span class="at">total =</span> <span class="fu">n</span>()</span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a> ) <span class="sc">|&gt;</span></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">ungroup</span>() <span class="sc">|&gt;</span></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">group_by</span>(type) <span class="sc">|&gt;</span></span>
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a> <span class="fu">summarise</span>(</span>
<span id="cb6-10"><a href="#cb6-10" aria-hidden="true" tabindex="-1"></a> <span class="at">has_excl =</span> title_has_excl,</span>
<span id="cb6-11"><a href="#cb6-11" aria-hidden="true" tabindex="-1"></a> <span class="at">prop_within_type =</span> total <span class="sc">/</span> <span class="fu">sum</span>(total)</span>
<span id="cb6-12"><a href="#cb6-12" aria-hidden="true" tabindex="-1"></a> ) </span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="cell">
<div class="sourceCode cell-code" id="cb7"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>prop_of_excl_within_type <span class="sc">|&gt;</span></span>
<span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">pivot_wider</span>(<span class="at">names_from =</span> <span class="st">"type"</span>, <span class="at">values_from =</span> prop_within_type) <span class="sc">|&gt;</span></span>
<span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a> <span class="fu">gt</span>() <span class="sc">|&gt;</span></span>
<span id="cb7-4"><a href="#cb7-4" aria-hidden="true" tabindex="-1"></a> gt<span class="sc">::</span><span class="fu">cols_label</span>(</span>
<span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a> <span class="at">has_excl =</span> <span class="st">"Contains Exclamtion"</span>,</span>
<span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a> <span class="at">fake =</span> <span class="st">"Fake"</span>, </span>
<span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a> <span class="at">real =</span> <span class="st">"Real"</span>) <span class="sc">|&gt;</span></span>
<span id="cb7-8"><a href="#cb7-8" aria-hidden="true" tabindex="-1"></a> gt<span class="sc">::</span><span class="fu">fmt_number</span>(<span class="at">columns=</span><span class="fu">c</span>(<span class="st">"fake"</span>, <span class="st">"real"</span>), <span class="at">decimals =</span> <span class="dv">3</span>) <span class="sc">|&gt;</span></span>
<span id="cb7-9"><a href="#cb7-9" aria-hidden="true" tabindex="-1"></a> gt<span class="sc">::</span><span class="fu">cols_width</span>(<span class="fu">everything</span>() <span class="sc">~</span> <span class="fu">px</span>(<span class="dv">100</span>))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output-display">
<div id="bwyculjrlm" style="overflow-x:auto;overflow-y:auto;width:auto;height:auto;">
<style>html {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
}
#bwyculjrlm .gt_table {
display: table;
border-collapse: collapse;
margin-left: auto;
margin-right: auto;
color: #333333;
font-size: 16px;
font-weight: normal;
font-style: normal;
background-color: #FFFFFF;
width: auto;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #A8A8A8;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #A8A8A8;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
}
#bwyculjrlm .gt_heading {
background-color: #FFFFFF;
text-align: center;
border-bottom-color: #FFFFFF;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#bwyculjrlm .gt_title {
color: #333333;
font-size: 125%;
font-weight: initial;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
border-bottom-color: #FFFFFF;
border-bottom-width: 0;
}
#bwyculjrlm .gt_subtitle {
color: #333333;
font-size: 85%;
font-weight: initial;
padding-top: 0;
padding-bottom: 6px;
padding-left: 5px;
padding-right: 5px;
border-top-color: #FFFFFF;
border-top-width: 0;
}
#bwyculjrlm .gt_bottom_border {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#bwyculjrlm .gt_col_headings {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
}
#bwyculjrlm .gt_col_heading {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 6px;
padding-left: 5px;
padding-right: 5px;
overflow-x: hidden;
}
#bwyculjrlm .gt_column_spanner_outer {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: normal;
text-transform: inherit;
padding-top: 0;
padding-bottom: 0;
padding-left: 4px;
padding-right: 4px;
}
#bwyculjrlm .gt_column_spanner_outer:first-child {
padding-left: 0;
}
#bwyculjrlm .gt_column_spanner_outer:last-child {
padding-right: 0;
}
#bwyculjrlm .gt_column_spanner {
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: bottom;
padding-top: 5px;
padding-bottom: 5px;
overflow-x: hidden;
display: inline-block;
width: 100%;
}
#bwyculjrlm .gt_group_heading {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
}
#bwyculjrlm .gt_empty_group_heading {
padding: 0.5px;
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
vertical-align: middle;
}
#bwyculjrlm .gt_from_md > :first-child {
margin-top: 0;
}
#bwyculjrlm .gt_from_md > :last-child {
margin-bottom: 0;
}
#bwyculjrlm .gt_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
margin: 10px;
border-top-style: solid;
border-top-width: 1px;
border-top-color: #D3D3D3;
border-left-style: none;
border-left-width: 1px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 1px;
border-right-color: #D3D3D3;
vertical-align: middle;
overflow-x: hidden;
}
#bwyculjrlm .gt_stub {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
}
#bwyculjrlm .gt_stub_row_group {
color: #333333;
background-color: #FFFFFF;
font-size: 100%;
font-weight: initial;
text-transform: inherit;
border-right-style: solid;
border-right-width: 2px;
border-right-color: #D3D3D3;
padding-left: 5px;
padding-right: 5px;
vertical-align: top;
}
#bwyculjrlm .gt_row_group_first td {
border-top-width: 2px;
}
#bwyculjrlm .gt_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#bwyculjrlm .gt_first_summary_row {
border-top-style: solid;
border-top-color: #D3D3D3;
}
#bwyculjrlm .gt_first_summary_row.thick {
border-top-width: 2px;
}
#bwyculjrlm .gt_last_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#bwyculjrlm .gt_grand_summary_row {
color: #333333;
background-color: #FFFFFF;
text-transform: inherit;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
}
#bwyculjrlm .gt_first_grand_summary_row {
padding-top: 8px;
padding-bottom: 8px;
padding-left: 5px;
padding-right: 5px;
border-top-style: double;
border-top-width: 6px;
border-top-color: #D3D3D3;
}
#bwyculjrlm .gt_striped {
background-color: rgba(128, 128, 128, 0.05);
}
#bwyculjrlm .gt_table_body {
border-top-style: solid;
border-top-width: 2px;
border-top-color: #D3D3D3;
border-bottom-style: solid;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
}
#bwyculjrlm .gt_footnotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#bwyculjrlm .gt_footnote {
margin: 0px;
font-size: 90%;
padding-left: 4px;
padding-right: 4px;
padding-left: 5px;
padding-right: 5px;
}
#bwyculjrlm .gt_sourcenotes {
color: #333333;
background-color: #FFFFFF;
border-bottom-style: none;
border-bottom-width: 2px;
border-bottom-color: #D3D3D3;
border-left-style: none;
border-left-width: 2px;
border-left-color: #D3D3D3;
border-right-style: none;
border-right-width: 2px;
border-right-color: #D3D3D3;
}
#bwyculjrlm .gt_sourcenote {
font-size: 90%;
padding-top: 4px;
padding-bottom: 4px;
padding-left: 5px;
padding-right: 5px;
}
#bwyculjrlm .gt_left {
text-align: left;
}
#bwyculjrlm .gt_center {
text-align: center;
}
#bwyculjrlm .gt_right {
text-align: right;
font-variant-numeric: tabular-nums;
}
#bwyculjrlm .gt_font_normal {
font-weight: normal;
}
#bwyculjrlm .gt_font_bold {
font-weight: bold;
}
#bwyculjrlm .gt_font_italic {
font-style: italic;
}
#bwyculjrlm .gt_super {
font-size: 65%;
}
#bwyculjrlm .gt_footnote_marks {
font-style: italic;
font-weight: normal;
font-size: 75%;
vertical-align: 0.4em;
}
#bwyculjrlm .gt_asterisk {
font-size: 100%;
vertical-align: 0;
}
#bwyculjrlm .gt_indent_1 {
text-indent: 5px;
}
#bwyculjrlm .gt_indent_2 {
text-indent: 10px;
}
#bwyculjrlm .gt_indent_3 {
text-indent: 15px;
}
#bwyculjrlm .gt_indent_4 {
text-indent: 20px;
}
#bwyculjrlm .gt_indent_5 {
text-indent: 25px;
}
</style>
<table class="gt_table" style="table-layout: fixed;; width: 0px">
<colgroup>
<col style="width:100px;">
<col style="width:100px;">
<col style="width:100px;">
</colgroup>
<thead class="gt_col_headings">
<tr>
<th class="gt_col_heading gt_columns_bottom_border gt_center" rowspan="1" colspan="1" scope="col">Contains Exclamtion</th>
<th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col">Fake</th>
<th class="gt_col_heading gt_columns_bottom_border gt_right" rowspan="1" colspan="1" scope="col">Real</th>
</tr>
</thead>
<tbody class="gt_table_body">
<tr><td class="gt_row gt_center">FALSE</td>
<td class="gt_row gt_right">0.733</td>
<td class="gt_row gt_right">0.978</td></tr>
<tr><td class="gt_row gt_center">TRUE</td>
<td class="gt_row gt_right">0.267</td>
<td class="gt_row gt_right">0.022</td></tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</main>
<!-- /main column -->

View File

@@ -1,11 +1,16 @@
---
title: "Chapter 2 Notes"
author: "Emanuel Rodriguez"
execute:
message: false
warning: false
format:
html:
mainfont: arial
monofont: "Cascadia Mono"
highlight-style: ayu-dark
highlight-style: gruvbox-dark
css: styles.css
callout-icon: false
callout-apperance: simple
---
In this chapter we step through an example
@@ -18,6 +23,8 @@ of real vs fake of a new news article titled "The President has a secret!"
# libraries
library(bayesrules)
library(dplyr)
library(tidyr)
library(gt)
data(fake_news)
fake_news <- tibble::as_tibble(fake_news)
```
@@ -45,4 +52,66 @@ This is the first "clue" or set of data that we have to build into our framework
Namely, majority of articles are "real", therefore we could simply predict that
the new article is "real". This updated sense or reality now becomes our priors.
Getting additional data, and updating our priors, based on additional data.
Getting additional data, and updating our priors, based on additional data. The
new observation we make is the use of exclamation marks "!". We note that the use
of "!" is more frequent in news articles labeled as "fake". We will want to incorporate
this into our framework to decide whether the new incoming should be labelled as
real or fake.
### Likelihood
:::{.callout-note}
## Probability and Likelihood
When the event $B$ is known, then we can evaluate the uncertainy of events
$A$ and $A^c$ given $B$
$$P(A|B) \text{ vs } P(A^c|B)$$
If on the other hand, we know event $A$ then we can evaluate the relative
compatability of data $A$ with $B$ and $B^c$ using likelihood functions
$$L(B|A) \text{ vs } L(B^c|A)$$
$$=P(A|B) \text{ vs } P(A|B^c)$$
:::
So in our case, we don't know whether this new incoming article is real or not,
but we do know that the title has an exclamation mark. This means we can
evaluate how likely this article is real or not given that it contains
an "!" in the title using likelihood functions. We can formualte this as:
$$L(B|A) \text{ vs } L(B^c|A)$$
And perform the computation in R as follows:
```{r}
# if fake, what are the proprotions of ! vs no-!
prop_of_excl_within_type <- fake_news |>
group_by(type, title_has_excl) |>
summarise(
total = n()
) |>
ungroup() |>
group_by(type) |>
summarise(
has_excl = title_has_excl,
prop_within_type = total / sum(total)
)
```
```{r}
prop_of_excl_within_type |>
pivot_wider(names_from = "type", values_from = prop_within_type) |>
gt() |>
gt::cols_label(
has_excl = "Contains Exclamtion",
fake = "Fake",
real = "Real") |>
gt::fmt_number(columns=c("fake", "real"), decimals = 3) |>
gt::cols_width(everything() ~ px(100))
```
The table above also shows the likelihoods for the case
when an article does not contain exclamation point in
the title.

File diff suppressed because one or more lines are too long

View File

@@ -1,34 +1,34 @@
/* quarto syntax highlight colors */
:root {
--quarto-hl-al-color: #ff3333;
--quarto-hl-an-color: #e6b673;
--quarto-hl-at-color: #59c2ff;
--quarto-hl-bn-color: #e6b450;
--quarto-hl-bu-color: #95e6cb;
--quarto-hl-ch-color: #95e6cb;
--quarto-hl-co-color: #626a73;
--quarto-hl-cv-color: #ffee99;
--quarto-hl-cn-color: #ffee99;
--quarto-hl-cf-color: #ff8f40;
--quarto-hl-dt-color: #ff8f40;
--quarto-hl-dv-color: #e6b450;
--quarto-hl-do-color: #626a73;
--quarto-hl-er-color: #ff3333;
--quarto-hl-ex-color: #59c2ff;
--quarto-hl-fl-color: #e6b450;
--quarto-hl-fu-color: #ffb454;
--quarto-hl-im-color: #c2d94c;
--quarto-hl-in-color: #e6b450;
--quarto-hl-kw-color: #ff8f40;
--quarto-hl-op-color: #f29668;
--quarto-hl-pp-color: #f07178;
--quarto-hl-re-color: #59c2ff;
--quarto-hl-sc-color: #95e6cb;
--quarto-hl-ss-color: #95e6cb;
--quarto-hl-st-color: #c2d94c;
--quarto-hl-va-color: #39bae6;
--quarto-hl-vs-color: #c2d94c;
--quarto-hl-wa-color: #f07178;
--quarto-hl-kw-color: #ebdbb2;
--quarto-hl-fu-color: #689d6a;
--quarto-hl-va-color: #458588;
--quarto-hl-cf-color: #cc241d;
--quarto-hl-op-color: #ebdbb2;
--quarto-hl-bu-color: #d65d0e;
--quarto-hl-ex-color: #689d6a;
--quarto-hl-pp-color: #d65d0e;
--quarto-hl-at-color: #d79921;
--quarto-hl-ch-color: #b16286;
--quarto-hl-sc-color: #b16286;
--quarto-hl-st-color: #98971a;
--quarto-hl-vs-color: #98971a;
--quarto-hl-ss-color: #98971a;
--quarto-hl-im-color: #689d6a;
--quarto-hl-dt-color: #d79921;
--quarto-hl-dv-color: #f67400;
--quarto-hl-bn-color: #f67400;
--quarto-hl-fl-color: #f67400;
--quarto-hl-cn-color: #b16286;
--quarto-hl-co-color: #928374;
--quarto-hl-do-color: #98971a;
--quarto-hl-an-color: #98971a;
--quarto-hl-cv-color: #928374;
--quarto-hl-re-color: #928374;
--quarto-hl-in-color: #282828;
--quarto-hl-wa-color: #282828;
--quarto-hl-al-color: #282828;
--quarto-hl-er-color: #cc241d;
}
/* other quarto variables */
@@ -36,143 +36,143 @@
--quarto-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
code span.al {
font-weight: bold;
color: #ff3333;
}
code span.an {
color: #e6b673;
}
code span.at {
color: #59c2ff;
}
code span.bn {
color: #e6b450;
}
code span.bu {
color: #95e6cb;
}
code span.ch {
color: #95e6cb;
}
code span.co {
font-style: italic;
color: #626a73;
}
code span.cv {
color: #ffee99;
}
code span.cn {
color: #ffee99;
}
code span.cf {
font-weight: bold;
color: #ff8f40;
}
code span.dt {
color: #ff8f40;
}
code span.dv {
color: #e6b450;
}
code span.do {
color: #626a73;
}
code span.er {
color: #ff3333;
text-decoration: underline;
}
code span.ex {
font-weight: bold;
color: #59c2ff;
}
code span.fl {
color: #e6b450;
}
code span.fu {
color: #ffb454;
}
code span.im {
color: #c2d94c;
}
code span.in {
color: #e6b450;
}
code span.kw {
font-weight: bold;
color: #ff8f40;
}
pre > code.sourceCode > span {
color: #b3b1ad;
color: #ebdbb2;
}
code span {
color: #b3b1ad;
color: #ebdbb2;
}
code.sourceCode > span {
color: #b3b1ad;
color: #ebdbb2;
}
div.sourceCode,
div.sourceCode pre.sourceCode {
color: #b3b1ad;
color: #ebdbb2;
}
code span.op {
color: #f29668;
code span.kw {
color: #ebdbb2;
font-weight: bold;
}
code span.pp {
color: #f07178;
}
code span.re {
color: #59c2ff;
}
code span.sc {
color: #95e6cb;
}
code span.ss {
color: #95e6cb;
}
code span.st {
color: #c2d94c;
code span.fu {
color: #689d6a;
}
code span.va {
color: #39bae6;
color: #458588;
}
code span.cf {
color: #cc241d;
font-weight: bold;
}
code span.op {
color: #ebdbb2;
}
code span.bu {
color: #d65d0e;
}
code span.ex {
color: #689d6a;
font-weight: bold;
}
code span.pp {
color: #d65d0e;
}
code span.at {
color: #d79921;
}
code span.ch {
color: #b16286;
}
code span.sc {
color: #b16286;
}
code span.st {
color: #98971a;
}
code span.vs {
color: #c2d94c;
color: #98971a;
}
code span.ss {
color: #98971a;
}
code span.im {
color: #689d6a;
}
code span.dt {
color: #d79921;
}
code span.dv {
color: #f67400;
}
code span.bn {
color: #f67400;
}
code span.fl {
color: #f67400;
}
code span.cn {
color: #b16286;
font-weight: bold;
}
code span.co {
color: #928374;
}
code span.do {
color: #98971a;
}
code span.an {
color: #98971a;
}
code span.cv {
color: #928374;
}
code span.re {
color: #928374;
}
code span.in {
color: #282828;
}
code span.wa {
color: #f07178;
color: #282828;
}
code span.al {
color: #282828;
font-weight: bold;
}
code span.er {
color: #cc241d;
text-decoration: underline;
}
.prevent-inlining {

5
R/styles.css Normal file
View File

@@ -0,0 +1,5 @@
@import url('https://fonts.googleapis.com/css?family=Lora&display=swap');
body {
font-family: 'Lora';
}