path_string: Print a hierarchical path string

View source: R/path_string.R

path_stringR Documentation

Print a hierarchical path string

Description

Print a hierarchical path string from a vector of names and levels

Usage

path_string(x, n)

Arguments

x

a vector of names

n

a vector of numbers with indentation level

Value

a character vector

Note

Used by pmc_text to print full path to subsection title

Author(s)

Chris Stubben

Examples

x <- c("carnivores", "bears", "polar", "grizzly", "cats", "tiger", "rodents")
n <- c(1, 2, 3, 3, 2, 3, 1)
path_string(x, n)

tidypmc documentation built on Sept. 11, 2024, 7:17 p.m.