code: Form the digital code of fossil fuels in accordance with GOST...

Description Usage Arguments Value Examples

View source: R/code.R

Description

In accordance with GOST 25543 (part 7) form the digital code of fossil fuel (brown, or hard coal, or anthracite) on the basis of its class, category, type, and subtype.

Usage

1
code(classid, catid, typeid, subtypeid)

Arguments

classid

identifier of fossil fuel class according to Table 3 of GOST 25543. Type: [character].

catid

identifier of fossil fuel category according to Table 4 of GOST 25543. Type: [character].

typeid

identifier of fossil fuel category according to Table 5 of GOST 25543. Type: [character].

subtypeid

identifier of fossil fuel subtype according to Table 8 of GOST 25543. Type: [character].

Value

Digital code according to Part 7 of GOST 25543. Type: [character].

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
 # Consider samples of hard coals with the next laboratory
 # measurement results:
 r0   <- c(1.1,  1.3)
 sok  <- c( 43, 76.0)
 vdaf <- c(8.4, 28.3)
 y    <- c(  6,  9.0)

 x <- code(fuel_class(r0), fuel_cat(sok), hard_type(vdaf), hard_subtype(y))
 print(x)
 # [1] "1140806" "1372809"

 # Unit test:
 stopifnot(
   x %in% coal.state:::g25543db()$hard$S1KCFx$code
 )

coal-coke/coal.state documentation built on Feb. 12, 2021, 10:02 a.m.