RInside Version 0.2.6
src/tools/unix2dos.r
Go to the documentation of this file.
00001 
00002 ## simple 0d 0a -> 0a converter to suppress a warning on Windows
00003 
00004 filename <- commandArgs(trailingOnly=TRUE)[1]
00005 if (!file.exists(filename)) q()
00006 
00007 con <- file(filename, "rb")
00008 bin <- readBin(con, raw(), 100000)
00009 bin <- bin[ which(bin != "0d") ]
00010 close(con)
00011 
00012 Sys.sleep(1)
00013 
00014 con <- file(filename, "wb")
00015 writeBin(bin, con)
00016 close(con)
00017 
 All Classes Files Functions Variables Enumerations Enumerator Defines