badge_minimal_r_version: Display the minimal R version

Description Usage Arguments Value See Also Examples

View source: R/badges.R

Description

Display the minimal R version

Usage

1

Arguments

chunk

places a r chunk in the readme

Value

markdown

Rmarkdown

See Also

Other badges: badge_codecov, badge_cran_ago, badge_cran_date, badge_cran_version_ago, badge_cran_version_release, badge_cran, badge_github_fork, badge_github_star, badge_last_change_static, badge_last_change, badge_license, badge_packageversion, badge_projectstatus, badge_rank, badge_rdocumentation, badge_thanks_md, badge_travis

Examples

1

Example output

[1] "```{r, echo = FALSE}"                                                                                          
[2] "dep <- as.vector(read.dcf('DESCRIPTION')[, 'Depends'])"                                                        
[3] "m <- regexpr('R *\\\\(>= \\\\d+.\\\\d+.\\\\d+\\\\)', dep)"                                                     
[4] "rm <- regmatches(dep, m)"                                                                                      
[5] "rvers <- gsub('.*(\\\\d+.\\\\d+.\\\\d+).*', '\\\\1', rm)"                                                      
[6] "```"                                                                                                           
[7] "[![minimal R version](https://img.shields.io/badge/R%3E%3D-`r rvers`-6666ff.svg)](https://cran.r-project.org/)"

badgecreatr documentation built on May 2, 2019, 6:13 a.m.