Learn R Programming

agilp (version 3.8.0)

filenamex: A file name listing utility

Description

Generates a text file with the name of all files in a given directory and saves it as a tab delimited txt file. Helpful for filling in template files (see Loader) without making mistakes

Usage

filenamex(input=file.path(system.file(package="agilp"),"input",""),output=file.path(system.file(package="agilp"),"output",""))

Arguments

input
full path of directory where input data files are put; default is a folder named input within the agilp package directory
output
full path of directory where output data files are put; default is a folder named output within the agilp package directory

Value

names.txt
A tab delimited text file with the names of all the files in the input directory

Details

None

References

In preparation

See Also

AAProcess Loader IDswop Baseline Equaliser AALoess

Examples

Run this code
#This example makes a list of files in the folder agilp/extdata/raw and saves it in a file called names.txt (tab delimited) in the folder agilp/output.
inputdir<-file.path(system.file(package="agilp"),"extdata","raw","", fsep = .Platform$file.sep)
outputdir<-file.path(system.file(package="agilp"),"output", "", fsep = .Platform$file.sep)
filenamex(input=inputdir,output=outputdir)

## Not run: 
# #to remove these files again and empty the output directory use 
# unlink(paste(file.path(system.file(package="agilp"),"output",""),"*.*",sep=""), recursive=FALSE)
# 
#    ## End(Not run)

Run the code above in your browser using DataLab