我想将new_post
R 功能的 subdir 更改为 content / myaseen208 blogdown
。但是,我的以下代码在内容中而不是在 content / myaseen208 中生成 ASD.md 。请问。
# Creating New Post
library(blogdown)
options(
blogdown.author = "Muhammad Yaseen"
, blogdown.subdir = "myaseen208"
, blogdown.ext = ".md"
)
# options()$blogdown.subdir
blogdown::new_post(
title = "ASD"
, kind = "default"
, open = interactive()
, author = "Muhammad Yaseen"
, categories = c("Statistics", "R")
, tags = NULL
, date = Sys.Date()
, file = "ASD.md"
, slug = NULL
, title_case = getOption("blogdown.title_case")
# , subdir = getOption("blogdown.subdir", "myaseen208")
, ext = getOption("blogdown.ext", ".md")
)
我的sessionInfo()
是
sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] blogdown_0.6
loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4 yaml_2.1.18 xfun_0.1
答案 0 :(得分:1)
这是因为您已向file
提供blogdown::new_post()
参数。提供时,new_post()
将尊重您的选择,并假设它正是您想要的路径。在您的情况下,您可以省略file
(让new_post()
为您生成路径),或提供完整路径,例如file = 'myaseen208/ASD.md'
。