-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathREADME.Rmd
66 lines (55 loc) · 1.76 KB
/
README.Rmd
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
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
```{r gh.url, echo=FALSE}
ghurl <- function(x) {
x <- unlist(x = strsplit(x = x, split = ','))
x <- trimws(x = x)
x <- grep(pattern = "https://github.com", x = x, value = TRUE)[1]
return(unname(obj = x))
}
```
```{r cran.cannoncial, echo=FALSE}
cran.cannoncial <- "https://cran.r-project.org/package="
```
```{r load.description, echo=FALSE}
description <- read.dcf(file = "DESCRIPTION")
# Get package name
pkg <- as.vector(x = description[, "Package"])
# Get GitHub URL
github.url <- ghurl(x = description[, "URL"])
# Parse version
pkg.version <- package_version(x = description[1, 'Version'])
stage <- if (pkg.version >= package_version(x = "1.0.0")) {
"stable"
} else if (pkg.version >= package_version(x = "0.1.0")) {
"maturing"
} else {
"experimental"
}
color <- c("experimental" = "orange", "maturing" = "blue", "stable" = "brightgreen")[stage]
```
# SeuratObject
<!-- badges: start -->
[![Lifecycle](https://img.shields.io/badge/lifecycle-`r stage`-`r color`.svg)](`r github.url`)
[![CRAN/METACRAN](https://img.shields.io/cran/v/`r pkg`)](`r paste0(cran.cannoncial, pkg)`)
[![dependencies](https://tinyverse.netlify.com/badge/`r pkg`)](`r paste0(cran.cannoncial, pkg)`)
[![Downloads](https://cranlogs.r-pkg.org/badges/`r pkg`?color=brightgreen)](`r paste0(cran.cannoncial, pkg)`)
<!-- badges: end -->
```{r description, echo=FALSE, results='asis'}
cat(gsub(pattern = '\n', replacement = ' ', x = description[, "Description"]))
```
## Installation
`r pkg` is available on CRAN
```r
install.packages("SeuratObject")
```