-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.Rmd
More file actions
executable file
·110 lines (75 loc) · 2.92 KB
/
Copy pathinstall.Rmd
File metadata and controls
executable file
·110 lines (75 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
title: "Install `metpath`"
author:
- name: Xiaotao Shen (https://www.shenxt.info/)
date: "Created on 2021-12-04 and updated on `r Sys.Date()`"
output:
html_document:
df_print: paged
toc: no
pdf_document:
toc: no
vignette: >
%\VignetteIndexEntry{install}
%\VignettePackage{massqc}
% \VignetteEngine{knitr::rmarkdown}
% \usepackage[utf8]{inputenc}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE, echo=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
warning = FALSE,
message = TRUE,
out.width = "100%"
)
```
# **Install `metpath` from GitLab**
You can just use the `remotes` to install `metpath`.
```{r,eval=FALSE,warning=FALSE, R.options="", message=FALSE, cache=TRUE}
remotes::install_gitlab("tidymass/metpath", dependencies = TRUE)
```
During the installation, it will ask if you want to update some packages for few times, just enter `enter` key to skip it.
# **Install `metpath` from GitHub**
You can just use the `remotes` to install `metpath`.
```{r,eval=FALSE,warning=FALSE, R.options="", message=FALSE, cache=TRUE}
remotes::install_github("tidymass/metpath", dependencies = TRUE)
```
During the installation, it will ask if you want to update some packages for few times, just enter `enter` key to skip it.
If there is a error like below:
```
Error: Failed to install 'metpath' from GitHub: HTTP error 403. API rate limit exceeded for 171.66.10.237. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)
```
Try to resolve it by:
1. In you R console, type this code:
```{r,eval=FALSE,warning=FALSE, R.options="", message=FALSE, cache=TRUE}
usethis::create_github_token()
```
It will open a page in browser, and create a "New personal access token" and copy it.

2. Then type this code:
```{r,eval=FALSE,warning=FALSE, R.options="", message=FALSE, cache=TRUE}
usethis::edit_r_environ()
```
and then add one line like below:
```
GITHUB_PAT=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
```
> The `GITHUB_PAT` should be yours that is created in step 1.
And then restart R session and try again.
[Let me know if you have any questions](shenxt1990@outlook.com).
# **Frequently Asked Questions**
1. Can not install dependent packages `raster` and `Cario`
`raster` is a package in [CRAN](https://cran.r-project.org/web/packages/raster/index.html), try to install it first and then install `metpath`.
```{r,eval=FALSE,warning=FALSE, R.options="", message=FALSE, cache=TRUE}
install.packages("raster")
```
`Cario` is a package in [CRAN](https://cran.r-project.org/web/packages/Cairo/index.html), try to install it first and then install `metpath`.
```{r,eval=FALSE,warning=FALSE, R.options="", message=FALSE, cache=TRUE}
install.packages("Cairo")
```
# **Session information**
```{r,eval=TRUE,warning=FALSE, R.options="", message=FALSE, cache=TRUE}
sessionInfo()
```