Learn R Programming

ape (version 5.8)

apetools: Tools to Explore Files

Description

These functions help to find files on the local disk.

Usage

Xplorefiles(from = "HOME", recursive = TRUE, ignore.case = TRUE)
editFileExtensions()
bydir(x)
Xplor(from = "HOME")

Value

Xplorefiles returns a list. bydir prints the file listings on the console.

Arguments

from

the directory where to start the file search; by default, the `HOME' directory. Use from = getwd() to start from the current working directory.

recursive

whether to search the subdirectories; TRUE by default.

ignore.case

whether to ignore the case of the file extensions; TRUE by default.

x

a list returned by Xplorefiles.

Author

Emmanuel Paradis

Details

Xplorefiles looks for all files with a specified extension in their names. The default is to look for the following file types: CLUSTAL (.aln), FASTA (.fas, .fasta), FASTQ (.fq, .fastq), NEWICK (.nwk, .newick, .tre, .tree), NEXUS (.nex, .nexus), and PHYLIP (.phy). This list can be modified with editFileExtensions.

bydir sorts the list of files by directories.

Xplor combines the other operations and opens the results in a Web browser with clickable links to the directories and files.

Examples

Run this code
if (FALSE) {
x <- Xplorefiles()
x # all data files on your disk
bydir(x) # sorted by directories
bydir(x["fasta"]) # only the FASTA files
Xplorefiles(getwd(), recursive = FALSE) # look only in current dir
Xplor()
}

Run the code above in your browser using DataLab