Show directories as indented names
tree(path = ".", options = "-F --charset=ascii", linux = TRUE)
| path | character[1] Is the root directory. Default is the value
of |
|---|---|
| options | character[1] String of options to be passed to
|
| linux | logical[1] Default is |
Prints an ASCII art of the directory tree.
This function calls
tree if
it is available is Linux OS. The call is made with
system(). Otherwise, a (less sophisticated) R native
approach is used.
dir_tree() for an implementation entirely
based on R and functional in all SO. Also,
dir(), list.files() and
list.dirs() can be useful in many
circumstances.
# NOT RUN { tree() tree("../") tree("../", linux = FALSE) system("tree --help") tree(system.file(package = "lattice"), options = "-F --charset=ascii -L 1") tree(system.file(package = "lattice"), options = "-F --charset=ascii -L 2") # }