Skip to content

Commit 931f909

Browse files
authored
README.md: alternative installation instructions
1 parent c148dfe commit 931f909

File tree

1 file changed

+41
-28
lines changed

1 file changed

+41
-28
lines changed

README.md

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -52,39 +52,52 @@ Installing from source might make sense if...
5252
not yet available on the CRAN version but is also likely less stable,
5353
- for some reason installation from CRAN is not an option for you.
5454

55-
In this case,
56-
57-
1. Start by cloning this repository"
58-
```
59-
$ git clone git@github.com:kuadrat/growR.git
60-
```
61-
or via https:
62-
```
63-
$ git clone https://github.com/kuadrat/growR.git
64-
```
65-
This will create a directory `growR` in your file system.
55+
In this case, start by cloning this repository
56+
```
57+
$ git clone git@github.com:kuadrat/growR.git
58+
```
59+
or via https:
60+
```
61+
$ git clone https://github.com/kuadrat/growR.git
62+
```
63+
This will create a directory `growR` in your file system.
6664

67-
If you don't have or don't want to use *git*, you could alternatively copy
68-
the source code as a .zip file from
69-
[github](https://github.com/kuadrat/growR/archive/refs/heads/master.zip).
70-
Unzip the contents into a directory `growR`.
71-
72-
2. You can now install *growR* by issuing the following at the prompt of
73-
an `R` session:
74-
```
75-
install.packages("/full/path/to/growR", repos = NULL)
76-
```
77-
You should replace `"/full/path/to/"` with the actual path to the `growR`
78-
directory on your computer. Also, replace slashes (`/`) with backslashe (`\`)
79-
if you're on Windows.
80-
81-
`growR` should now be installed and available in `R` through
82-
`library(growR)`.
65+
If you don't have or don't want to use *git*, you could alternatively copy
66+
the source code as a .zip file from
67+
[github](https://github.com/kuadrat/growR/archive/refs/heads/master.zip).
68+
Unzip the contents into a directory `growR`.
69+
70+
#### Alternative A
8371

72+
You can now install your local version of *growR* by issuing
73+
the following at the prompt of an `R` session:
74+
```
75+
install.packages("/full/path/to/growR", repos = NULL)
76+
```
77+
You should replace `"/full/path/to/"` with the actual path to the `growR`
78+
directory on your computer. Also, replace slashes (`/`) with backslashe (`\`)
79+
if you're on Windows.
80+
81+
`growR` should now be installed and available in `R` through `library(growR)`.
8482
If you make changes to the source files in the `growR` directory, just
8583
uninstall the current version (issue `remove.packages("growR")` in `R`)
86-
and repeat step 2 above.
84+
and repeat this step.
85+
86+
#### Alternative B
8787

88+
If you make frequent changes to the code, it might be
89+
unpractical to uninstall and reinstall the changed version each time. In that
90+
case, `devtools` comes in very handy (if needed, install it with
91+
`install.packages("devtools")`). It allows you to load a package into an active
92+
`R` session without the need of it being properly installed. The following has
93+
practically the equivalent result as the method described in
94+
[alternative A](#alternative-a):
95+
```
96+
library(devtools)
97+
devtools::load_all("/full/path/to/growR")
98+
```
99+
The notes about `"/full/path/to"` as in [Alternative A](#alternative-a) apply here as well.
100+
88101
### Non-package version
89102

90103
If you just want to focus on using and adjusting the ModVege model and feel

0 commit comments

Comments
 (0)