Package 'crformats'

Title: Using Quarto Extensions Designed for Cancer Registry Reports
Description: Provides Quarto extension templates, styles, and helper functions for generating high-quality cancer registry reports.
Authors: Qiong Chen [aut, cre, cph] (ORCID: <https://orcid.org/0000-0003-2401-0046>, affiliation: Department of Cancer Epidemiology, The Affiliated Cancer Hospital of Zhengzhou University & Henan Cancer Hospital, Henan Cancer Registry in China)
Maintainer: Qiong Chen <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2026-06-05 08:00:51 UTC
Source: https://github.com/gigu003/crformats

Help Index


Copy an Internal File from the Package

Description

Copy an Internal File from the Package

Usage

copy_internal_file(folder, file, dest, overwrite = FALSE)

Arguments

folder

A string indicating the internal folder in the package (relative to ⁠inst/⁠) containing the file.

file

A string specifying the name of the file to copy.

dest

A string specifying the destination path (including filename) to copy the file to.

overwrite

Logical; if TRUE, will overwrite the file at the destination if it exists. Default is FALSE.

Value

NULL (invisibly). The function is called for its side effect of copying a file.


List available docx templates in the package

Description

List available docx templates in the package

Usage

ls_docx()

Value

A character vector of docx template file names.

Examples

ls_docx()

List bundled Quarto extensions

Description

List bundled Quarto extensions

Usage

ls_ext()

Value

a string of available extensions for install

Examples

ls_ext()

Use the docx templates in the manuscript package

Description

Use the docx templates in the manuscript package

Usage

use_docx_template(name = "chinese", overwrite = TRUE)

Arguments

name

Name of the docx template.

overwrite

Whether to overwrite the template file if it exists.

Value

Path of the created/used template.

Examples

## Not run: 
use_docx_template("chinese")

## End(Not run)

Install bundled Quarto extensions into specified directory

Description

Install bundled Quarto extensions into specified directory

Usage

use_quarto_ext(
  ext_name = "qcreport",
  dir = NULL,
  use_qmd = TRUE,
  qmd_name = "index"
)

Arguments

ext_name

String indicating which extension to install

dir

Character string indicating where extension to install

use_qmd

Logical, whether to copy default qmd file

qmd_name

Name for the .qmd file (default is 'index.qmd')

Value

a message if extension was successfully copied over

Examples

## Not run: 
use_quarto_ext("qcreport")

## End(Not run)