Skip to content

Commit

Permalink
markdown source builds
Browse files Browse the repository at this point in the history
Auto-generated via {sandpaper}
Source  : ed8bc7d
Branch  : main
Author  : Toby Hodges <tbyhdgs@gmail.com>
Time    : 2024-06-11 09:47:04 +0000
Message : Merge pull request #892 from swcarpentry/update/packages

Update 12 packages
  • Loading branch information
actions-user committed Jun 11, 2024
1 parent 09bae81 commit 4bc5cbc
Show file tree
Hide file tree
Showing 17 changed files with 755 additions and 1,871 deletions.
144 changes: 72 additions & 72 deletions 01-rstudio-intro.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions 02-project-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,33 +185,33 @@ shell to answer the following questions:
By running these commands in the shell:


```sh
``` sh
ls -lh data/gapminder_data.csv
```

```output
-rw-r--r-- 1 runner docker 80K May 21 00:17 data/gapminder_data.csv
``` output
-rw-r--r-- 1 runner docker 80K Jun 11 09:50 data/gapminder_data.csv
```

The file size is 80K.


```sh
``` sh
wc -l data/gapminder_data.csv
```

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

There are 1705 lines. The data looks like:


```sh
``` sh
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
44 changes: 22 additions & 22 deletions 03-seeking-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ function, "function\_name", from a specific function that is in a package loaded
namespace (your interactive R session) is:


```r
``` r
?function_name
help(function_name)
```

For example take a look at the help file for `write.table()`, we will be using a similar function in an upcoming episode.


```r
``` r
?write.table()
```

Expand All @@ -57,7 +57,7 @@ Different functions might have different sections, but these are the main ones y
Notice how related functions might call for the same help file:


```r
``` r
?write.table()
?write.csv()
```
Expand Down Expand Up @@ -93,7 +93,7 @@ means you don't have to remember that!
To seek help on special operators, use quotes or backticks:


```r
``` r
?"<-"
?`<-`
```
Expand All @@ -116,15 +116,15 @@ RStudio also has a set of excellent
If you're not sure what package a function is in or how it's specifically spelled, you can do a fuzzy search:


```r
``` r
??function_name
```

A fuzzy search is when you search for an approximate string match. For example, you may remember that the function
to set your working directory includes "set" in its name. You can do a fuzzy search to help you identify the function:


```r
``` r
??set
```

Expand All @@ -147,19 +147,19 @@ If you can't find the answer, there are a few useful functions to
help you ask your peers:


```r
``` r
?dput
```

Will dump the data you're working with into a format that can
be copied and pasted by others into their own R session.


```r
``` r
sessionInfo()
```

```output
``` output
R version 4.4.0 (2024-04-24)
Platform: x86_64-pc-linux-gnu
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.4.0 tools_4.4.0 yaml_2.3.8 knitr_1.46 xfun_0.43
[1] compiler_4.4.0 tools_4.4.0 yaml_2.3.8 knitr_1.47 xfun_0.44
[6] renv_1.0.7 evaluate_0.23
```

Expand All @@ -197,7 +197,7 @@ Look at the help page for the `c` function. What kind of vector do you
expect will be created if you evaluate the following:


```r
``` r
c(1, 2, 3)
c('d', 'e', 'f')
c(1, 2, 'f')
Expand Down Expand Up @@ -232,7 +232,7 @@ What's the difference between the `sep` and `collapse` arguments?
To look at the help for the `paste()` function, use:


```r
``` r
help("paste")
?paste
```
Expand All @@ -251,43 +251,43 @@ separator and not a term to concatenate.
e.g.


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

```output
``` output
[1] "a c" "b c"
```

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

```output
``` output
[1] "a c ," "b c ,"
```

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

```output
``` output
[1] "a,c" "b,c"
```

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

```output
``` output
[1] "a c|b c"
```

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

```output
``` output
[1] "a,c|b,c"
```

Expand Down
Loading

0 comments on commit 4bc5cbc

Please sign in to comment.