csl_style_find: Search for a CSL style

View source: R/csl_style_find.R

csl_style_findR Documentation

Search for a CSL style

Description

Search for a CSL style

Usage

csl_style_find(x)

Arguments

x

(character) a full or partial journal name

Value

if no matches NULL. otherwise, one or more file paths to the style file on your machine

Examples

# setup
csl_cache$cache_path_set("seasl", type = "tempdir")
csl_cache$mkdir()
dir.create(file.path(csl_cache$cache_path_get(), "styles"))
an <- system.file('inst/examples/acta-naturae.csl', package = 'seasl')
file.copy(an, file.path(csl_cache$cache_path_get(), "styles/acta-naturae.csl"))

# find a style
csl_style_find(x = "Naturae")

# cleanup
csl_cache$delete_all()

## Not run: 
# fetch styles
csl_fetch_styles()

# single match
csl_style_find(x = "American Journal of Epidemiology")

# many matches
csl_style_find(x = "American Journal")
csl_style_find(x = "pediatrics")
csl_style_find(x = "analysis and prevention")

# no matches
csl_style_find(x = "foo bar")

## End(Not run)

ropenscilabs/seasl documentation built on Sept. 12, 2022, 4:11 p.m.