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)
The path to the formatting list.
The formatting list as an R object.
Other flist:
as.data.frame.fmt_lst()
,
as.flist()
,
as.flist.data.frame()
,
as.flist.fcat()
,
as.flist.list()
,
as.flist.tbl_df()
,
flist()
,
is.flist()
,
print.fmt_lst()
,
write.flist()
# 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"