knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) # Set WD to Root
here::i_am("dev/path.Rmd")
library(fs)
library(here)

Path Package

fs::path_package("thaipdf", "pre-tex")
system.file("pre-tex", package ="thaipdf" )

fs::path_package("thaipdf", "templates")
system.file("templates", package ="thaipdf" )

Error if not exist

fs::path_package("thaipdf", "foo")
system.file("foo", package ="thaipdf" )


Lightbridge-KS/thaipdf documentation built on June 18, 2022, 6:58 a.m.