hard_code: Form the digital code for hard coals in accordance with GOST...

Description Usage Arguments Value Examples

View source: R/hard_code.R

Description

In accordance with GOST 25543 (part 7) form the digital code for hard coal using results of laboratory measurements.

Usage

1
hard_code(r, sok, vdaf, y, sl = rep_len(0, length(r)))

Arguments

r

reflectance of vitrinite, [%], measured in accordance with ISO 7404-5. Type: [double].

sok

total volume of all fusinite fractions, [%]. The next fusinite fractions may be considered:

inertinite

determined in accordance with ISO 7404-3

two thirds of semivitrinite

determined in accordance with GOST R 55662

Type: [numeric].

vdaf

volatile matter yield, [%], measured in accordance with ISO 562 or ISO 5071-1 and recalculated on dry ash-free basis. Type: [double].

y

plastometric index y, [mm], measured in accordance with GOST 1186. Type: [double].

sl

crucible swelling number, [], measured in accordance with ISO 501. Type: [double].

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
16
17
18
19
20
21
# Consider five samples of hard coals with the next laboratory
# measurement results:
r0   <- c(.43, .64, .87, 1.1, 4.6)
sok  <- c(5.3, 2, 3, 24, 21)
vdaf <- c(41.8, 38.6, 37.3, 26.3, 8.1)
y <- c(0, 13, 26, 12, 6)
# Since crucible swelling number is rarely measured in laboratories
# they do not specify its value in this example

x <- hard_code(r0, sok, vdaf, y)
print(x)
# [1] "0404000" "0603813" "0803626" "1122612" "4620806

# Unit test:
stopifnot(
  x %in% with(coal.state:::g25543db()$hard, {
    c(
      SDB04x$code, G2Gx$code, G2X81x$code, S1KOBx$code, S2OCBx$code
    )
  })
)

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