Code
import numpy as np
x = np.random.normal(size=100)
import matplotlib.pyplot as plt
plt.hist(x)
plt.show()
np.mean(x)
np.float64(0.07202495897593807)
[UNDER CONSTRUCTION]
This is an example of using qmd as the source document.
\[ \theta = \int_0^\infty f(x,\theta)d\theta \]
This content can be styled via the border class.
This is an example of a callout with a title.
This code is not executed.
| Default | Left | Right | Center |
|---|---|---|---|
| 12 | 12 | 12 | 12 |
| 123 | 123 | 123 | 123 |
| 1 | 1 | 1 | 1 |
---
title: "Unit 1: Intro"
format:
html:
code-fold: show
code-tools: true
---
[UNDER CONSTRUCTION]
This is an example of using qmd as the source document.
## Evaluated Python code chunk, with a plot
```{python}
import numpy as np
x = np.random.normal(size=100)
import matplotlib.pyplot as plt
plt.hist(x)
plt.show()
np.mean(x)
```
## $\LaTeX$
$$
\theta = \int_0^\infty f(x,\theta)d\theta
$$
## Styled div via direct html
::: {.border}
This content can be styled via the border class.
:::
## A callout
::: {.callout-tip}
## Tip with Title
This is an example of a callout with a title.
:::
## Tabset
::: {.panel-tabset}
## R
This code is not executed.
```{.r}
fizz_buzz <- function(fbnums = 1:50) {
output <- dplyr::case_when(
fbnums %% 15 == 0 ~ "FizzBuzz",
fbnums %% 3 == 0 ~ "Fizz",
fbnums %% 5 == 0 ~ "Buzz",
TRUE ~ as.character(fbnums)
)
print(output)
}
fizz_buzz(3)
```
## Python
This code is executed.
```{python}
def fizz_buzz(num):
if num % 15 == 0:
print("FizzBuzz")
elif num % 5 == 0:
print("Buzz")
elif num % 3 == 0:
print("Fizz")
else:
print(num)
fizz_buzz(3)
```
:::
## A basic Markdown table
| Default | Left | Right | Center |
|----|:--|---:|-----------------------:|
| 12 | 12 | 12 | 12 |
| 123 | 123 | 123 | 123 |
| 1 | 1 | 1 | 1 |