ISBNProvider: ISBNProvider

ISBNProviderR Documentation

ISBNProvider

Description

International Standard Book Number - Provider. ISBN starts with group code, all English language ISBN-10 codes start with a 0 or 1, and all German language books start with a 3. see https://en.wikipedia.org/wiki/List_of_ISBN_registration_groups.

Charlatan does not provide further helpers for you, but you can supply the prefix yourself, if for instance you want to create Mexican ISBNs you can by supplying the ISBN10 prefix 970, or for Andorra supply the ISBN 13 prefix 97899920 (that is 978 for ISBN13, and 99920 for Andorra).

Super class

charlatan::BareProvider -> ISBNProvider

Methods

Public methods

Inherited methods

Method isbn10()

Make a ISBN10 This is a completely random (apart from the prefix), but valid ISBN10 number.

Usage
ISBNProvider$isbn10(n = 1, prefix = NULL)
Arguments
n

(integer) number of ISBN10s to make, default=1

prefix

(integer/character) prefix for ISBN


Method isbn13()

Make a ISBN13. This is a completely random (apart from the prefix), but valid ISBN13 number.

Usage
ISBNProvider$isbn13(n = 1, prefix = NULL)
Arguments
n

(integer) number of ISBN10s to make, default=1

prefix

(integer/character) prefix for ISBN


Method clone()

The objects of this class are cloneable with this method.

Usage
ISBNProvider$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

z <- ISBNProvider$new()
z$isbn10()
z$isbn13()
z$isbn10(10)
z$isbn13(100)
# or even z$isbn10(500)

ropensci/charlatan documentation built on Oct. 18, 2024, 7:45 a.m.