knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file()) # Set WD to Root here::i_am("dev/fs-test.Rmd") library(fs) library(here) library(dplyr)
path_chr <- c("thai.tex", "thai.zip.tex", "./thai.tex", "../thai.tex", "out/thai.tex", "/Users/kittipos/my_pkg", "~/my_pkg")
fs::path_abs(fs::path_ext_remove(path_chr))
fs::path_ext_remove(path_chr) %>% fs::path_abs() %>% fs::path(ext = "other")
fs::path_ext_remove(path_chr) %>% fs::path(ext = "other") %>% fs::path_abs()
fs::path(fs::path_abs(fs::path_ext_remove(path_chr)), ext = "tex") fs::path(fs::path_ext_remove(path_chr), ext = "tex")
path_*
fs::path_abs(path_chr)
fs::path_wd(path_chr) # Will fail some of these
path_file(path_chr)
fs::path_ext_remove(path_chr)
Note that 2 extension will remove the first one
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.