lineEnding | R Documentation |
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.
lineEnding(infile, pattern = NULL, outfile = NULL, to = c("dos", "unix"), ...)
infile |
Input filename(s). |
pattern |
See |
outfile |
Output filename. If not supplied, 'infile' will be overwritten. |
to |
Either |
... |
Additional arguments passed to |
Florian Detsch
Dos2Unix/Unix2Dos Text file format converters.
list.files()
, system()
.
## 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.