knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

misc

Build Status Project Status: Active – The project has reached a stable, usable state and is being actively developed. R build status Codecov test coverage CodeFactor

{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 with:

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.

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(.)
### What commit is this file at?
misc::ipak("git2r")
if (in_repository(path = ".")) {
  repository(".")
}


kguidonimartins/misc documentation built on Dec. 20, 2024, 7:03 p.m.