5 Comments
这个文件的树状结构图不知道怎么画的,https://github.com/rbind/yihui/blob/master/content/pkg-xfun.md?plain=1 没找到源码,Ubuntu 下我用 system("tree") 倒是也能实现,就是感觉不够方便。
手动画的。
xfun 中也有个 tree() 函数,是 str() 的魔改版,用来展示数据结构:
xfun::tree(list(root = list(data = list('cars.csv')), docs = list('foo.Rmd')))List of 2
|-root:List of 1
| |-data:List of 1
| |-: chr "cars.csv"
|-docs:List of 1
|-: chr "foo.Rmd"
无意中在知乎上看到 fs::dir_tree() 可以实现文件的树状结构图。
Guest *Eric McKinney* @ 2019-03-22 04:54:28 originally posted:
Super useful! Thanks for putting all of these together into one package, Yihui!
Guest *Eyayaw T. Beze* @ 2021-05-20 17:16:40 originally posted:
The new functions are very visible. Very impressive! Thank you.
Hi! I've been having problems with xfun when I want to knit a document to pdf (in markdown).
This is the error that shows up:
Error in xfun::normalize_path(path, ..., must_work = must_work, resolve_symlink = FALSE) :
unused argument (resolve_symlink = FALSE)
Calls: <Anonymous> -> normalize_path
Ejecución interrumpida
Other specifications:
R version 4.0.5 (2021-03-31)
Package version:
knitr_1.39 rmarkdown_2.21 tinytex_0.44 xfun_0.30
Pandoc version: 2.19.2
LaTeX version used:
MiKTeX 21.2
Thank you very much for your help! Let me know if you need further descriptions to help me.
When in doubt, try to update software packages.
Also see yihui/xfun#79
rmarkdown 2.21 requires xfun >= 0.36, and I'm not sure how you managed to install rmarkdown without installing the appropriate version of xfun (probably because you are using an R version that is way too old).
Thank you for your quick response!
However, i've been updating my packages but I can't get a newer version of xfun, only 0.30. What can I do?
(i've tried removing-updating each package, re-installing R, but I get the same version)
Thank your very much YiHui
You are welcome! As I said in my previous reply, your R version is too old. The current latest version of R is 4.2.3.
Dear Yihui, thank you very much for your help! Problem solved. I really appreciate your quick and gentle responses.
Sign in to join the discussion
Sign in with GitHub