[R] system call removes special characters from text output

MacQueen, Don macqueen1 at llnl.gov
Wed Apr 5 23:06:41 CEST 2017

I can't reproduce this.

On my system, the contents of an executable file named tmp.pl:

#! /opt/local/bin/perl
print "[A/B]\n";

At a shell prompt:

[72]% ./tmp.pl

Inside R:

> system(' ./tmp.pl')

Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550

On 4/3/17, 8:57 PM, "R-help on behalf of stephen sefick" <r-help-bounces at r-project.org on behalf of ssefick at gmail.com> wrote:

    I am writing an R package, and I am using system() to call a perl script.
    The output of the perl script is correct except for "[A/B]" is output as
    "AB". Can someone explain this behavior. I would like to try and fix this.
    many thanks,
    Stephen Sefick
    Let's not spend our time and resources thinking about things that are so
    little or so large that all they really do for us is puff us up and make us
    feel like gods.  We are mammals, and have not exhausted the annoying little
    problems of being mammals.
                                    -K. Mullis
    "A big computer, a complex algorithm and a long time does not equal
                                  -Robert Gentleman
    	[[alternative HTML version deleted]]
    R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
    PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
    and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list