Learn R Programming

blogdown (version 1.19)

find_yaml: 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)

Value

find_yaml() returns a character vector of filenames;

count_yaml() returns a list of frequency tables.

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.

Examples

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

count_yaml(sort_by_count = FALSE)

Run the code above in your browser using DataLab