powered by
Convert the Chinese headers of bookdown .Rmd files into Pinyin
bookdown2py(folder = "py", remove_curly_bracket = TRUE, nonezh_replace = NULL, only_first_letter = TRUE)
character. The folder in which the files are to be converted.
logical. Whether to remove existing curly brackets in the headers.
NULL or character. Define how to convert non-Chinese characters in mychar. NULL means 'let it be'.
logical. Wheter only the first letter in pinyin.
new .Rmd files with Pinyin headers.
# NOT RUN { mydir <- paste0(tempdir(), "/py") dir.create(mydir) file.create(paste0(mydir, "/test.txt")) writeLines(text = "# test\n", paste0(mydir, "/test.txt")) bookdown2py(mydir) # }
Run the code above in your browser using DataLab