-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
91 lines (73 loc) · 2.66 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
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
---
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%"
)
```
# misc
<!-- badges: start -->
[![Build Status](https://travis-ci.com/kguidonimartins/misc.svg?branch=main)](https://travis-ci.com/kguidonimartins/misc)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R build status](https://github.com/kguidonimartins/misc/workflows/R-CMD-check/badge.svg)](https://github.com/kguidonimartins/misc/actions)
[![Codecov test coverage](https://codecov.io/gh/kguidonimartins/misc/branch/master/graph/badge.svg)](https://codecov.io/gh/kguidonimartins/misc?branch=master)
[![CodeFactor](https://www.codefactor.io/repository/github/kguidonimartins/misc/badge/main)](https://www.codefactor.io/repository/github/kguidonimartins/misc/overview/main)
<!-- badges: end -->
`{misc}` stands for *miscellaneous*. This is a personal package. Use it at your own risk.
## Installation
You can install the released version of misc from [github](https://github.com/kguidonimartins/misc) with:
```{r, message=FALSE}
if (!require("remotes")) install.packages("remotes")
if (!require("misc")) remotes::install_github("kguidonimartins/misc")
```
### Available functions
Check all available functions inside an interactive session using `help(package = misc)` or in the site package [here](https://kguidonimartins.github.io/misc/reference/index.html).
```{r, echo=FALSE, message=FALSE}
suppressPackageStartupMessages({
library(tidyverse)
})
get_func <- function(func) {
tools::parse_Rd(file = func) %>%
.[5] %>%
flatten() %>%
.[[1]]
}
get_title <- function(title) {
tools::parse_Rd(file = title) %>%
.[9] %>%
flatten() %>%
.[[1]]
}
mans <- fs::dir_ls(path = "man", regexp = "\\.Rd")
list_func <- list()
list_title <- list()
for (i in seq_along(mans)) {
list_func[i] <- get_func(mans[i])[1]
list_title[i] <- get_title(mans[i])[1]
}
full_join(
list_func %>% enframe() %>%
unnest(cols = c(value)) %>%
transmute(ID = name, Function = value),
list_title %>% enframe() %>%
unnest(cols = c(value)) %>%
transmute(ID = name, Description = value),
by = "ID"
) %>%
filter(Description != "Pipe operator") %>%
mutate(Function = paste0("`", Function, "()`")) %>%
as.data.frame() %>%
knitr::kable(.)
```
```{r, echo=FALSE,eval=FALSE}
### What commit is this file at?
misc::ipak("git2r")
if (in_repository(path = ".")) {
repository(".")
}
```