Skip to content
/ ftExtra Public

Helper functions for the flextable package

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

atusy/ftExtra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0eb23c1 · Apr 12, 2024
Sep 20, 2023
Apr 11, 2024
Apr 12, 2024
Feb 26, 2024
Mar 31, 2024
Feb 26, 2024
Feb 26, 2024
Apr 20, 2022
Oct 28, 2020
Apr 2, 2024
Mar 31, 2024
Mar 12, 2020
Mar 12, 2020
Sep 19, 2023
Apr 11, 2024
Mar 31, 2024
Mar 31, 2024
Mar 14, 2020
Apr 2, 2024
Mar 12, 2020

Repository files navigation

ftExtra

R-CMD-check CRAN status Downloads Monthly downloads

The ftExtra package provides helper functions for the flextable package:

  • colformat_md parses markdown texts in columns
  • span_header makes multi-level headers
  • and more!

Installation

from CRAN

install.packages("ftExtra")

from GitHub

options(repos = c(atusy = 'https://atusy.r-universe.dev', getOption("repos")))
install.packages("ftExtra")

Example

library(ftExtra)

Parse markdown texts

data.frame(
  x = c("**bold**", "*italic*"),
  y = c("^superscript^", "~subscript~"),
  z = c("***~ft~^Extra^** is*", "*Cool*"),
  stringsAsFactors = FALSE
) %>%
  flextable() %>%
  colformat_md()

Span headers

iris %>%
  head %>%
  flextable() %>%
  span_header()

Group rows

library(dplyr, warn.conflicts = FALSE)
iris %>%
  group_by(Species) %>%
  slice(1:2) %>%
  flextable()