write_registration_file: Create a registration file

Description Usage Arguments Details How to Use the Registration File Examples

View source: R/report_spec.r

Description

This function will create a registration file to help determine the correct cpuom and lpuom for your editor/printer.

Usage

1

Arguments

file_path

The full or relative file name and path to create the registration file.

Details

The cpi and lpi are used in output_type = "text" to determine available space on the page. The registration file can help determine the correct settings for the target text editor and printer. Failure to set the correct characters per unit of measure (cpuom) and lines per unit of measure (lpuom) may result in misalignment of content on the page when printing text output.

How to Use the Registration File

To use the registration file, first decide the units of measure you wish to use, inches or centimeters. Next, create the registration file by calling the write_registration_file function. Then print the registration file.

Once the registration file is printed, take a ruler and measure both the horizontal and vertical registration lines from zero to 60 in the desired units of measure. For example, if your units of measure is 'inches', measure the registration lines in inches.

Record the distance measured in each direction. For each direction, divide 60 by the distance measured, and round to three decimal places. The horizontal result is the characters per unit of measure (cpuom). The vertical result is the lines per unit of measure (lpuom). To get an accurate printing of text reports, assign these values to the cpuom and lpuom parameters on the options_fixed function.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
library(rptr)

# Create temp file path
tmp <- file.path(tempdir(), "reg.txt")

# Create the registration file 
write_registration_file(tmp)

# Write registration file to the console
writeLines(readLines(tmp))

# 0--------+---------+---------+---------+---------+---------+
# -       10        20        30        40        50        60
# -
# -
# -
# -
# -
# -
# -
# + 10
# -
# -
# -
# -
# -
# -
# -
# -
# -
# + 20
# -
# -
# -
# -
# -
# -
# -
# -
# -
# + 30
# -
# -
# -
# -
# -
# -
# -
# -
# -
# + 40
# -
# -
# -
# -
# -
# -
# -
# -
# -
# + 50
# -
# -
# -
# -
# -
# -
# -
# -
# -
# + 60

dbosak01/reporter documentation built on Sept. 22, 2020, 3:34 p.m.