Skip to content

Commit

Permalink
DOC readme
Browse files Browse the repository at this point in the history
  • Loading branch information
doehm committed Jun 29, 2024
1 parent 69ec4ca commit c55cafc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ suppressPackageStartupMessages(library(forcats))
suppressPackageStartupMessages(library(survivoR))
suppressPackageStartupMessages(library(paletteer))
suppressPackageStartupMessages(library(glue))
suppressPackageStartupMessages(library(rvest))
good_pal <<- c("#ffffff", "#f2fbd2", "#c9ecb4", "#93d3ab", "#35b0ab")
bad_pal <<- rev(c("#ef6351", "#f38375", "#f7a399", "#fbc3bc", "#ffe3e0", "white"))
Expand All @@ -40,6 +41,13 @@ n_people <- survivoR::castaways |>
nrow()
version <- str_replace(readLines("DESCRIPTION")[4], 'Version: ', 'v')
url <- "https://cran.r-project.org/web/packages/survivoR/index.html"
cran_version <- read_html(url) |>
html_text() |>
str_extract("Version:\n[:digit:]{1}\\.[:digit:]+\\.[:digit:]+") |>
str_remove("Version:\n")
cran_version <- paste0("v", cran_version)
```

Expand All @@ -53,7 +61,7 @@ survivoR is a collection of data sets detailing events across `r max_seasons` se

# Installation

Now on CRAN (v2.3.2) or Git (`r version`).
Install from CRAN (**`r cran_version`**) or Git (**`r version`**).

If Git > CRAN I'd suggest install from Git. We are constantly improving the data sets so the github version is likely to be slightly improved.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ winners, jury votes, advantage details and a lot more.

# Installation

Now on CRAN (v2.3.2) or Git (v2.3.4).
Install from CRAN (**v2.3.4**) or Git (**v2.3.4**).

If Git \> CRAN I’d suggest install from Git. We are constantly improving
the data sets so the github version is likely to be slightly improved.
Expand Down

0 comments on commit c55cafc

Please sign in to comment.