src/tools/unix2dos.r

## simple 0d 0a -> 0a converter to suppress a warning on Windows

filename <- commandArgs(trailingOnly=TRUE)[1]
if (!file.exists(filename)) q()

con <- file(filename, "rb")
bin <- readBin(con, raw(), 100000)
bin <- bin[ which(bin != "0d") ]
close(con)

Sys.sleep(1)

con <- file(filename, "wb")
writeBin(bin, con)
close(con)

Try the RInside package in your browser

Any scripts or data that you put into this service are public.

RInside documentation built on Feb. 16, 2023, 6:53 p.m.