check_code: Check id of documents

View source: R/codes.R

check_codeR Documentation

Check id of documents

Description

Given an id check if it is valid.

Usage

check_code(id)

valid_code(id, sumario = TRUE, BORME = FALSE)

Arguments

id

ID or CVE of the document (character).

sumario

Logical value if sumarios should be accepted.

BORME

Logical value if BORME journal should be accepted.

Value

A logical value if correct, errors if something is not right.

Functions

  • valid_code(): Returns logic values

Examples

check_code("BOE-S-20141006") # Normal way
check_code("BOE-S-2014-242") # Also accepted but not documented
# Will fail:
# check_code("BOE-S-2014")
valid_code("BOE-S-2014")

rOpenSpain/BOE documentation built on Dec. 26, 2024, 2:50 p.m.