The read.flist function reads a formatting list from the file system. The function accepts a path to the formatting list, reads the list, and returns it.

read.flist(file_path)

Arguments

file_path

The path to the formatting list.

Value

The formatting list as an R object.

Examples

# Create formatting list
fl <- flist(f1 = "%5.1f",
            f2 = "%6.2f",
            type = "row")
           
# Get temp directory
tmp <- tempdir()            
           
# Save formatting list to file system
pth <- write.flist(fl, dir_path = tmp)

# Read from file system
fr <- read.flist(pth)

# Create sample data
dat <- c(12.3844, 292.28432)

# Use formats in the catalog
fapply(dat, fr)
# [1] " 12.4"  "292.28"