Home Comments Thread
New Thread

[xfun] An Introduction to xfun - A Collection of Miscellaneous Functions | /xfun/

utterances-bot utterances-bot 2021-10-29 09:34:59

An Introduction to xfun - A Collection of Miscellaneous Functions

https://yihui.org/xfun/

5 Comments

yihui yihui 2021-10-29 13:19:34

手动画的。

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"
👍 1
chuxinyuan chuxinyuan 2024-03-16 17:53:04

无意中在知乎上看到 fs::dir_tree() 可以实现文件的树状结构图。

giscus-bot giscus-bot 2022-12-17 05:40:05
Guest *Eric McKinney* @ 2019-03-22 04:54:28 originally posted:

Super useful! Thanks for putting all of these together into one package, Yihui!

giscus-bot giscus-bot 2022-12-17 05:40:05
Guest *Eyayaw T. Beze* @ 2021-05-20 17:16:40 originally posted:

The new functions are very visible. Very impressive! Thank you.

ibecker1 ibecker1 2023-04-13 14:30:48

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.

👍 1
yihui yihui 2023-04-13 15:24:16

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).

ibecker1 ibecker1 2023-04-14 15:31:49

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

yihui yihui 2023-04-14 16:31:03

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.

ibecker1 ibecker1 2023-04-14 17:09:57

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