Description Usage Arguments Value Author(s) See Also Examples
This function mimics the
tree
shell command in Linux. It shows directories in a tree structure
as an ASCII art. Not all options were enabled.
1 |
path |
character[1] Root path for the construction of the ASCII representation. |
level |
integer[1] A positive integer that is how many levels to
show. Default is 3. Use |
type |
character[1] This is the display mode. Default is
|
all.files |
logical[1] Using |
Returns the directory list as invisible.
Walmes Zeviani, walmes@ufpr.br.
tree()
for an implementation that calls
tree
on Linux. Also, dir()
,
list.files()
and
list.dirs()
can be useful in many
circumstances.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# Tree of your currend directory.
getwd()
dir_tree()
dir_tree(type = "none")
dir_tree(all.files = TRUE)
# Tree of a installed package.
dir_tree(system.file(package = "lattice"), level = 1)
dir_tree(system.file(package = "lattice"), level = 2)
dir_tree(system.file(package = "lattice"), level = 3)
dir_tree(system.file(package = "lattice"), level = 4)
m <- dir_tree(system.file(package = "MASS"), level = 2)
str(m)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.