Skip to content

Commit

Permalink
markdown source builds
Browse files Browse the repository at this point in the history
Auto-generated via {sandpaper}
Source  : ce32b3a
Branch  : main
Author  : Milan Malfait <[email protected]>
Time    : 2024-05-10 09:54:08 +0000
Message : Update 23 packages (#36)

Co-authored-by: milanmlft <[email protected]>
  • Loading branch information
actions-user and milanmlft committed May 10, 2024
1 parent 8f525b9 commit 757464c
Show file tree
Hide file tree
Showing 16 changed files with 318 additions and 2,019 deletions.
52 changes: 26 additions & 26 deletions 01-rstudio-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ The simplest thing you could do with R is to do arithmetic:
1 + 100
```

```{.output}
```output
[1] 101
```

Expand Down Expand Up @@ -205,7 +205,7 @@ From highest to lowest precedence:
3 + 5 * 2
```

```{.output}
```output
[1] 13
```

Expand All @@ -218,7 +218,7 @@ intend.
(3 + 5) * 2
```

```{.output}
```output
[1] 16
```

Expand All @@ -243,7 +243,7 @@ Really small or large numbers get a scientific notation:
2/10000
```

```{.output}
```output
[1] 2e-04
```

Expand All @@ -257,7 +257,7 @@ You can write numbers in scientific notation too:
5e3 # Note the lack of minus here
```

```{.output}
```output
[1] 5000
```

Expand All @@ -279,7 +279,7 @@ doesn't require an argument, whereas for the next set of mathematical functions
sin(1) # trigonometry functions
```

```{.output}
```output
[1] 0.841471
```

Expand All @@ -288,7 +288,7 @@ sin(1) # trigonometry functions
log(1) # natural logarithm
```

```{.output}
```output
[1] 0
```

Expand All @@ -297,7 +297,7 @@ log(1) # natural logarithm
log10(10) # base-10 logarithm
```

```{.output}
```output
[1] 1
```

Expand All @@ -306,7 +306,7 @@ log10(10) # base-10 logarithm
exp(0.5) # e^(1/2)
```

```{.output}
```output
[1] 1.648721
```

Expand Down Expand Up @@ -336,7 +336,7 @@ We can also do comparisons in R:
1 == 1 # equality (note two equals signs, read as "is equal to")
```

```{.output}
```output
[1] TRUE
```

Expand All @@ -345,7 +345,7 @@ We can also do comparisons in R:
1 != 2 # inequality (read as "is not equal to")
```

```{.output}
```output
[1] TRUE
```

Expand All @@ -354,7 +354,7 @@ We can also do comparisons in R:
1 < 2 # less than
```

```{.output}
```output
[1] TRUE
```

Expand All @@ -363,7 +363,7 @@ We can also do comparisons in R:
1 <= 1 # less than or equal to
```

```{.output}
```output
[1] TRUE
```

Expand All @@ -372,7 +372,7 @@ We can also do comparisons in R:
1 > 0 # greater than
```

```{.output}
```output
[1] TRUE
```

Expand All @@ -381,7 +381,7 @@ We can also do comparisons in R:
1 >= -9 # greater than or equal to
```

```{.output}
```output
[1] TRUE
```

Expand Down Expand Up @@ -424,7 +424,7 @@ in something called a **variable**. `x` now contains the **value** `0.025`:
x
```

```{.output}
```output
[1] 0.025
```

Expand All @@ -439,7 +439,7 @@ have appeared. Our variable `x` can be used in place of a number in any calculat
log(x)
```

```{.output}
```output
[1] -3.688879
```

Expand Down Expand Up @@ -550,15 +550,15 @@ same data type. For example:
1:5
```

```{.output}
```output
[1] 1 2 3 4 5
```

```r
2^(1:5)
```

```{.output}
```output
[1] 2 4 8 16 32
```

Expand All @@ -567,7 +567,7 @@ x <- 1:5
2^x
```

```{.output}
```output
[1] 2 4 8 16 32
```

Expand All @@ -587,7 +587,7 @@ ls()
```


```{.output}
```output
[1] "x" "y"
```

Expand All @@ -611,7 +611,7 @@ If we type `ls` by itself, R prints a bunch of code instead of a listing of obje
ls
```

```{.output}
```output
function (name, pos = -1L, envir = as.environment(pos), all.names = FALSE,
pattern, sorted = TRUE)
{
Expand Down Expand Up @@ -643,7 +643,7 @@ function (name, pos = -1L, envir = as.environment(pos), all.names = FALSE,
}
else all.names
}
<bytecode: 0x555acfeea9c8>
<bytecode: 0x5650a736f918>
<environment: namespace:base>
```

Expand All @@ -658,7 +658,7 @@ created earlier contains 1, 2, 3, 4, 5:
x
```

```{.output}
```output
[1] 1 2 3 4 5
```

Expand Down Expand Up @@ -694,7 +694,7 @@ If instead we use `<-`, there will be unintended side effects, or you may get an
rm(list <- ls())
```

```{.error}
```error
Error in rm(list <- ls()): ... must contain names or character strings
```

Expand Down Expand Up @@ -804,7 +804,7 @@ One way of answering this question in R is to use the `>` to set up the followin
mass > age
```

```{.output}
```output
[1] TRUE
```

Expand Down
8 changes: 4 additions & 4 deletions 02-project-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ By running these commands in the shell:
ls -lh data/gapminder_data.csv
```

```{.output}
-rw-r--r-- 1 runner docker 80K Apr 25 13:25 data/gapminder_data.csv
```output
-rw-r--r-- 1 runner docker 80K May 10 09:55 data/gapminder_data.csv
```

The file size is 80K.
Expand All @@ -200,7 +200,7 @@ The file size is 80K.
wc -l data/gapminder_data.csv
```

```{.output}
```output
1705 data/gapminder_data.csv
```

Expand All @@ -211,7 +211,7 @@ There are 1705 lines. The data looks like:
head data/gapminder_data.csv
```

```{.output}
```output
country,year,pop,continent,lifeExp,gdpPercap
Afghanistan,1952,8425333,Asia,28.801,779.4453145
Afghanistan,1957,9240934,Asia,30.332,820.8530296
Expand Down
14 changes: 7 additions & 7 deletions 03-seeking-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ be copied and pasted by others into their own R session.
sessionInfo()
```

```{.output}
```output
R version 4.3.3 (2024-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.4 LTS
Expand All @@ -181,7 +181,7 @@ attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.3.3 tools_4.3.3 yaml_2.3.8 knitr_1.45 xfun_0.43
[1] compiler_4.3.3 tools_4.3.3 yaml_2.3.8 knitr_1.46 xfun_0.43
[6] renv_1.0.7 evaluate_0.23
```

Expand Down Expand Up @@ -255,39 +255,39 @@ e.g.
paste(c("a","b"), "c")
```

```{.output}
```output
[1] "a c" "b c"
```

```r
paste(c("a","b"), "c", ",")
```

```{.output}
```output
[1] "a c ," "b c ,"
```

```r
paste(c("a","b"), "c", sep = ",")
```

```{.output}
```output
[1] "a,c" "b,c"
```

```r
paste(c("a","b"), "c", collapse = "|")
```

```{.output}
```output
[1] "a c|b c"
```

```r
paste(c("a","b"), "c", sep = ",", collapse = "|")
```

```{.output}
```output
[1] "a,c|b,c"
```

Expand Down
Loading

0 comments on commit 757464c

Please sign in to comment.