[Rd] .Platform$eol.sep ? [Re: "\r" with RSQLite]

Martin Maechler maechler at stat.math.ethz.ch
Fri Mar 17 11:36:52 CET 2006


[ diverted from R-help to R-devel ]

>>>>> "DJ" == David James <dj at research.bell-labs.com>
>>>>>     on Thu, 16 Mar 2006 09:51:31 -0500 writes:

    DJ> That is a bug, namely, the default end of line on the windows version 
    DJ> should be "\r\n" instead of "\n".  The workaround is to specify 
    DJ> eol="\r\n" in dbWriteTable(), e.g.,

    DJ> dbWriteTable(con, "DF", df, eol = "\r\n")
    DJ> dbReadTable(con, "DF")

    DJ> Hope this helps,

    DJ> --
    DJ> David

    DJ> PS The object .Platform includes path.sep and file.sep but not
    DJ> end of line separator (as of 2.2.0) -- would it make sense to
    DJ> also include eol.sep?

I think it would.  AFAIK, the Macs used to have  "\r" such that

  Unix:    "\n"
  Windoze: "\r\n"
  Mac :    "\r"

but it could well be that this has only been for Mac OS x.y, x <= 9,
i.e., is no longer true for MacOS X (which would behave like `Unix' then).

Brian Ripley is currently enjoying holidays AFAIK; I think he
might want to shed more light on this as well.

Martin



More information about the R-devel mailing list