book_length: Function to count the number of words in files in a quarto...

View source: R/book_length.R

book_lengthR Documentation

Function to count the number of words in files in a quarto book project

Description

This function takes the path to the '_quarto.yml' file and the average number of words a person can read per minute as input. It reads the '_quarto.yml' file to get the list of chapters in the book project. For each chapter, it calculates the word count and the estimated reading time in minutes based on the average words per minute. It then returns a summary of the book, including the total word count, average reading time, and total reading time in hours, as well as a table with detailed information for each chapter.

Usage

book_length(quarto_yml_path = "_quarto.yml", words_per_minute = 200)

Arguments

quarto_yml_path

The path to the '_quarto.yml' file (default: "_quarto.yml").

words_per_minute

The average number of words a person can read per minute (default: 200).

Value

None (prints the book summary and chapter info).

Examples

## Not run: 
count_words_in_book("_quarto.yml", 200)

## End(Not run)


francojc/francojcr documentation built on Feb. 1, 2024, 9:56 p.m.