# NOT RUN {
dat <- iris
dat[1:4, 1] <- NA
dat[, 2] <- dat[, 2] * 1000000
ft <- flextable(head(dat))
j = c("Sepal.Length", "Sepal.Width",
"Petal.Length", "Petal.Width")
ft <- colformat_num(
x = ft, j = j,
big.mark=",", digits = 2, na_str = "N/A")
autofit(ft)
# }
Run the code above in your browser using DataLab