lineEnding {Orcs} | R Documentation |
Convert Between DOS and UNIX Line Endings
Description
This function converts between DOS and UNIX style line endings by invoking
unix2dos
(or dos2unix
) upon a text file (see also
system("unix2dos --help")
). Note that 'unix2dos' must be installed on your
local system, see Source.
Usage
lineEnding(infile, pattern = NULL, outfile = NULL, to = c("dos", "unix"), ...)
Arguments
infile |
Input filename(s). |
pattern |
See |
outfile |
Output filename. If not supplied, 'infile' will be overwritten. |
to |
Either |
... |
Additional arguments passed to |
Author(s)
Florian Detsch
Source
Dos2Unix/Unix2Dos Text file format converters.
See Also
Examples
## input file
infile <- paste(system.file(package = "Orcs"), "DESCRIPTION", sep = "/")
## convert to dos line endings and write to output file
ofl = file.path(tempdir(), "DESCRIPTION4wd")
lineEnding(infile, outfile = ofl, to = "dos")
[Package Orcs version 1.2.3 Index]