[R] Prevent line truncation in system2() output

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Sun Mar 15 21:14:17 CET 2015


You don't say which operating system you are using, but this sounds like it could easily be affected by your OS (even of in this case it isn't). My suggestion would be to use a temporary file.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

On March 15, 2015 11:02:57 AM PDT, Luiz Max Carvalho <luizepidemiologia at gmail.com> wrote:
>Hey all,
>
>I'm developing an application that calls third party software using
>system2(...,  stdout = TRUE) and then reads this using textConnection()
>+
> read.csv ().
>
>Problem is that sometimes the output is bigger than 8096 bytes and then
>the
>lines are split (from system2 documentation), what messes up what I
>have
>set up to read the output.
>
>Is there any way of preventing system2() from breaking the lines? I
>think I
>can work around this issue, but I'm looking for a cleaner solution for
>the
>time being.
>
>Cheers,
>
>Luiz



More information about the R-help mailing list