inst/doc/list_of_functions.R

## ----setup, message=FALSE, warning=FALSE, include=FALSE-----------------------
library(insight)
library(datawizard)
library(bayestestR)
library(parameters)
library(performance)
library(correlation)
library(effectsize)
library(modelbased)
library(see)
library(report)
library(easystats)

options(
  knitr.kable.NA = "",
  digits = 2
)

knitr::opts_chunk$set(
  comment = ">",
  dpi = 450,
  message = FALSE,
  warning = FALSE
)

## ----echo=FALSE, results='asis'-----------------------------------------------
# it would be cool to add the title / description for all functions

all_funs <- NULL

for (package in easystats::easystats_packages()) {
  fns <<- ls(paste0("package:", package))
  rds_filepath <- file.path(find.package(package), "help", "aliases.rds")

  all_fns <- as.data.frame(readRDS(rds_filepath))
  all_fns <- rownames_as_column(all_fns)
  names(all_fns) <- c("func", "file")
  all_fns <- data_filter(all_fns, func %in% fns)
  all_fns$file <- paste0(all_fns$file, ".html")

  functions <- apply(all_fns, 1, function(x) {
    paste0(
      "[**`",
      x[1],
      "`**](https://easystats.github.io/",
      package,
      "/reference/",
      x[2],
      ") *(",
      package,
      ")*"
    )
  })

  all_funs <- c(all_funs, functions)
}

cat(paste(c("", sort(all_funs)), collapse = "\n- "))

Try the easystats package in your browser

Any scripts or data that you put into this service are public.

easystats documentation built on Sept. 11, 2024, 7:59 p.m.