Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

primært chunk-naming #171

Merged
merged 3 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions episodes/hvad-vi-glemte.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ numerical errors.

This:

```{r}
```{r num-impres-1}
7/13 - 3/31
```

is different from:
```{r}
```{r num-impres-2}
print(7/13 - 3/31, digits = 16)
```
Actually $\frac{7}{13} - \frac{3}{31}$ is equal to $\frac{178}{403}$. If we subtract
one from the other, we should get 0. We do not...

```{r}
```{r num-impres-3}
(7/13 - 3/31) - (178/403)
```

Expand All @@ -53,7 +53,7 @@ we can expect to be correct is 15-16 significant digits after the decimal separa
This means that we have to expect errors, and that they might accumulate.


```{r}
```{r integrate}
integrand <- function(x) {1/((x+1)*sqrt(x))}
integrate(integrand, lower = 0, upper = Inf)

Expand Down Expand Up @@ -122,7 +122,7 @@ sammenhænge.

Funktioner hvis output er en funktion.

```{r}
```{r func-making-func}
mycumfun <- ecdf(rnorm(10))
mycumfun(0)
```
Expand Down
8 changes: 4 additions & 4 deletions episodes/reading-files.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ The package `haven` supports reading SPSS (Stata and SAS) files

Use the package to read in spss files:

```{r eval = F}
```{r spss-files, eval = F}
library(haven)
read_spss("filename")
```
Expand All @@ -149,7 +149,7 @@ economics.
As mentioned above, the `haven` package provides functions for reading
Stata files:

```{r eval = F}
```{r stata-files, eval = F}
library(haven)
read_stata("filename")
```
Expand All @@ -168,7 +168,7 @@ Institute.

The package `haven` can read SAS-files:

```{r eval = F}
```{r sas-files, eval = F}
library(haven)
read_sas("filename")
```
Expand Down Expand Up @@ -205,7 +205,7 @@ row (etc), are called nested, and are typically stored or distributed in the
JSON-format.

JSON can be read using `fromJSON()` from the `jsonlite` library.
```{r eval= FALSE}
```{r json-files, eval= FALSE}
library(jsonlite)
fromJSON("filename")
```
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This site is a collection of individual episodes. It is not intended
as a single course. The concept is for this site to act as the foundation for made-to-measure courses.
Based on the individual and specific needs in a given situation, we will make a
selection of relevant episodes, and string them together to form a tailored
course,.
course.

The episodes are under construction, and will continue to be, as we will
add new content until we have covered any subject that might arise working with
Expand Down