fw.make: Write to a file using a configurable fixed width format

Description Usage Arguments See Also Examples

Description

You can learn more about package authoring with RStudio at:

Usage

1
fw.make(conf, data, file = FALSE)

Arguments

conf

Config list object

data

Data Frame you are intending to write

file

Write to File? (FALSE or string to be the file name) (optional)

See Also

fw.check for config validation 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
# Example Configuration List
conf = list(
  item1 = list(
    start = 1,
    end = 10,
    align = "l",
    padding = " ",
    trim = FALSE,
    required = TRUE
  ),
  item2 = list(
    start = 11,
    end = 20,
    align = "r",
    padding = 0,
    trim = TRUE,
    required = FALSE,
    default = " "
  )
)

# Example Data
data = data.frame(item1 = c("AAAA", "BBBB", "CCCC"), item2 = c(254, 2.25, 1.4))

fw.make(conf, data, file = FALSE)

JestonBlu/fixedWidth documentation built on May 10, 2019, 1:15 a.m.