switch from readr::write_file to writeLines
diff --git a/NAMESPACE b/NAMESPACE
index d30b54e..e100fdf 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -21,7 +21,6 @@
importFrom(magrittr,"%>%")
importFrom(readr,read_file)
importFrom(readr,read_lines)
-importFrom(readr,write_file)
importFrom(rmarkdown,latex_dependency)
importFrom(rmarkdown,metadata)
importFrom(rvest,html_table)
diff --git a/R/kableExtra-package.R b/R/kableExtra-package.R
index 9dc9689..32131c1 100644
--- a/R/kableExtra-package.R
+++ b/R/kableExtra-package.R
@@ -65,7 +65,7 @@
#' @importFrom rmarkdown latex_dependency
#' @importFrom magrittr %>%
#' @importFrom utils read.csv
-#' @importFrom readr read_lines read_file write_file
+#' @importFrom readr read_lines read_file
#' @name kableExtra-package
#' @aliases kableExtra
#' @docType package
diff --git a/R/kable_as_image.R b/R/kable_as_image.R
index 044943c..30c33f9 100644
--- a/R/kable_as_image.R
+++ b/R/kable_as_image.R
@@ -67,7 +67,7 @@
)
temp_tex <- paste(temp_tex, collapse = "\n")
temp_file <- paste0("table_", format(Sys.time(), "%Y-%m-%d_%H%M%S"))
- write_file(temp_tex, paste0(temp_file, ".tex"))
+ writeLines(temp_tex, paste0(temp_file, ".tex"))
system(paste0("xelatex -interaction=batchmode ", temp_file, ".tex"))
temp_file_delete <- paste0(temp_file, c(".tex", ".aux", ".log"))
unlink(temp_file_delete)