edf2asc: Call SRR "edf2asc" command line utility to do some work.

Description Usage Arguments Details Value Author(s) Examples

View source: R/edf2asc.R

Description

A convenience wrapper around the SR Research edf2asc file conversion utility.

Usage

1
edf2asc(edffiles)

Arguments

edffiles

Character vector of *edf file names to be converted. File names should include paths relative to the current working directory, or fully qualified paths.

Details

Call SR Research "edf2asc" command line utility to convert *edf files to *asc files. Each *asc file is placed in the same directory as the *edf file that it is derived from. Existing *asc files will NOT be over-written by default, because that is the default for the SRR edf2asc utility.

To prepare edf2asc() to work with the edf2asc command line utility provided by SR Research, follow these steps:

Before calling the utility, this function will check to see that the specified file exists and is executable. However, if the selected version of the edf2asc executable is in some way incompatible with your platform, then this function will fail with a cryptic error. The best way to guard against this is to check that your edf2asc executable file works as expected from the command line before attempting to use it from within FDBeye.

The function edf2asc() also checks getOption("FDBeye_edf2asc_opts"). If this option exists, it should be a valid string of command line options to pass to the SRR edf2asc utility (e.g., "-y -ns"). See the SRR documentation for details. We recommend to use the "-y" option to overwrite existing *asc files; otherwise, edf2asc() may not work properly.

In addition to creating the requested *asc files, this function will write a log file ('edf2asc.log') of messages captured from the stdout of SRR edf2asc utility and place it in the current working directory.

Value

Called for the side effect of converting SRR *edf files to *asc files. Returns a character vector listing output files (*asc files).

Author(s)

Dave Braze [email protected]

Monica Li [email protected]

Examples

1
2
3
4
5
6
## Not run: 
fin <- list.files(".", pattern="edf$", recursive=TRUE)
fout <- edf2asc(fin)
fout

## End(Not run)

davebraze/FDBeye documentation built on Sept. 22, 2018, 9:39 p.m.