find_yaml: Find posts containing the specified metadata

View source: R/utils.R

find_yamlR Documentation

Find posts containing the specified metadata

Description

Given a YAML field name, find the (R) Markdown files that contain this field and its value contains any of the specified values. Functions find_tags() and find_categories() are wrappers of find_yaml() with field = 'tags' and field = 'categories', respectively; count_fields() returns the frequency tables of the specified YAML fields, such as the counts of tags and categories.

Usage

find_yaml(field = character(), value = character(), open = FALSE)

find_tags(value = character(), open = FALSE)

find_categories(value = character(), open = FALSE)

count_yaml(fields = c("categories", "tags"), sort_by_count = TRUE)

Arguments

field, fields

A character vector of YAML field names.

value

A vector of the field values to be matched.

open

Whether to open the matched files automatically.

sort_by_count

Whether to sort the frequency tables by counts.

Value

find_yaml() returns a character vector of filenames; count_yaml() returns a list of frequency tables.

Examples

library(blogdown)
find_tags(c("time-series", "support vector machine"))
find_categories("Statistics")

count_yaml(sort_by_count = FALSE)

blogdown documentation built on May 29, 2024, 8:55 a.m.

Related to find_yaml in blogdown...