在 blogdown R 包中更改 new_post 中的子目录
Changing subdir in new_post in blogdown R package
我想将 subdir 更改为 content/myaseen208 for new_post
R 函数来自 blogdown
。但是,我的以下代码在 content 而不是 content/myaseen208[=26 中生成 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
那是因为您向 blogdown::new_post()
提供了 file
参数。提供后,new_post()
将尊重您的选择,并假定它正是您想要的路径。在您的情况下,您要么省略 file
(让 new_post()
为您生成路径),要么提供完整路径,例如 file = 'myaseen208/ASD.md'
.
我想将 subdir 更改为 content/myaseen208 for new_post
R 函数来自 blogdown
。但是,我的以下代码在 content 而不是 content/myaseen208[=26 中生成 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
那是因为您向 blogdown::new_post()
提供了 file
参数。提供后,new_post()
将尊重您的选择,并假定它正是您想要的路径。在您的情况下,您要么省略 file
(让 new_post()
为您生成路径),要么提供完整路径,例如 file = 'myaseen208/ASD.md'
.