Skip to content

Commit 9e38e61

Browse files
Update readme install instructions
1 parent 46bd026 commit 9e38e61

File tree

2 files changed

+64
-2
lines changed

2 files changed

+64
-2
lines changed

README.Rmd

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ knitr::opts_chunk$set(
1919
[![R-CMD-check](https://github.com/aleksanderbl29/geodk/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/aleksanderbl29/geodk/actions/workflows/R-CMD-check.yaml)
2020
[![Codecov test coverage](https://codecov.io/gh/aleksanderbl29/geodk/graph/badge.svg)](https://app.codecov.io/gh/aleksanderbl29/geodk)
2121
[![Project Status: WIP – Development in progress](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
22-
2322
<!-- badges: end -->
2423

2524
`{geodk}` provides access to Danish geospatial data.
@@ -33,6 +32,48 @@ You can install the development version of geodk from [GitHub](https://github.co
3332
pak::pak("aleksanderbl29/geodk")
3433
```
3534

35+
36+
37+
## Installation
38+
39+
```{r check_cran, include=FALSE}
40+
if (!require(available)) install.packages("available")
41+
is_on_cran <- !available::available_on_cran("geodk")
42+
```
43+
44+
```{r cran_instruct, echo=FALSE, results='asis', eval=is_on_cran}
45+
cat("You can install `{geodk}` from CRAN with:")
46+
```
47+
48+
```{r cran_code, eval=FALSE, include=is_on_cran}
49+
install.packages("geodk")
50+
```
51+
52+
```{r r_universe_instruct, echo=FALSE, results='asis'}
53+
if (is_on_cran) {
54+
cat("Or you can install the latest pre-release version of `{geodk}` from r-universe with:")
55+
} else if (!is_on_cran) {
56+
cat("You can install `{geodk}` from r-universe with:")
57+
}
58+
```
59+
60+
```{r r_universe, eval=FALSE}
61+
install.packages(
62+
"geodk",
63+
repos = c(
64+
aleksanderbl29 = "https://aleksanderbl29.r-universe.dev",
65+
getOption("repos")
66+
)
67+
)
68+
```
69+
70+
You can install the latest development version of `{geodk}` from [GitHub](https://github.com/aleksanderbl29/geodk) with:
71+
72+
``` r
73+
# install.packages("devtools")
74+
devtools::install_github("aleksanderbl29/geodk")
75+
```
76+
3677
## Functions
3778

3879
`{geodk}` provides to main sets of functions:

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
coverage](https://codecov.io/gh/aleksanderbl29/geodk/graph/badge.svg)](https://app.codecov.io/gh/aleksanderbl29/geodk)
1111
[![Project Status: WIP – Development in
1212
progress](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
13-
1413
<!-- badges: end -->
1514

1615
`{geodk}` provides access to Danish geospatial data.
@@ -25,6 +24,28 @@ You can install the development version of geodk from
2524
pak::pak("aleksanderbl29/geodk")
2625
```
2726

27+
## Installation
28+
29+
You can install `{geodk}` from r-universe with:
30+
31+
``` r
32+
install.packages(
33+
"geodk",
34+
repos = c(
35+
aleksanderbl29 = "https://aleksanderbl29.r-universe.dev",
36+
getOption("repos")
37+
)
38+
)
39+
```
40+
41+
You can install the latest development version of `{geodk}` from
42+
[GitHub](https://github.com/aleksanderbl29/geodk) with:
43+
44+
``` r
45+
# install.packages("devtools")
46+
devtools::install_github("aleksanderbl29/geodk")
47+
```
48+
2849
## Functions
2950

3051
`{geodk}` provides to main sets of functions:

0 commit comments

Comments
 (0)