[R] system call removes special characters from text output

Bert Gunter bgunter.4567 at gmail.com
Tue Apr 4 18:52:58 CEST 2017


... and perhaps worth noting (again) is that one of the benefits of
producing a repro ex is that it often reveals such bugs to the
prospective poster, thus obviating the need to post.

-- Bert



Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Apr 4, 2017 at 9:28 AM, stephen sefick <ssefick at gmail.com> wrote:
> Hello everyone,
>
> Again, I apologize for not providing a reproducible example. There was a
> small (but important) bug in my R code having nothing to do with system(),
> this is now fixed, and everything is working as expected this morning. The
> lesson for me is time to stop coding after 10 PM. Thank you for all of the
> help.
> kindest regards,
>
> Stephen
>
> On Tue, Apr 4, 2017 at 11:01 AM, Boris Steipe <boris.steipe at utoronto.ca>
> wrote:
>
>> The "whatever information" would be the usual minimal reproducible example.
>>
>> Since you think your code works at the shell level, make up an example
>> with a system call to "echo".
>> Then state what you expect to happen and what happens instead.
>>
>> B.
>>
>>
>>
>> > On Apr 4, 2017, at 12:44 AM, stephen sefick <ssefick at gmail.com> wrote:
>> >
>> > Hi Jeff,
>> >
>> > My apologies for not providing enough information. The perl code works as
>> > expected at the shell (without calling it from R). I have tried the
>> system
>> > call inside of an ESS R session and at a the shell. Both of these produce
>> > the unexpected result. I can provide whatever information that is needed.
>> > kindest regards,
>> >
>> > Stephen
>> >
>> > On Mon, Apr 3, 2017 at 11:23 PM, Jeff Newmiller <
>> jdnewmil at dcn.davis.ca.us>
>> > wrote:
>> >
>> >> Sorry, RPsychic package not found. Please install package reprex, apply
>> it
>> >> to your problem and try again. Note that if this problem can only be
>> >> produced from within a package then there is an R-package-devel mailing
>> >> list that would be a more appropriate place to ask. Also, if the
>> problem is
>> >> actually in the perl code or in the shell (this seems likely to me) then
>> >> you probably need to look even further afield for help.
>> >> --
>> >> Sent from my phone. Please excuse my brevity.
>> >>
>> >> On April 3, 2017 8:57:07 PM PDT, stephen sefick <ssefick at gmail.com>
>> wrote:
>> >>> Hello,
>> >>>
>> >>> 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
>> > science."
>> >
>> >                              -Robert Gentleman
>> >
>> >       [[alternative HTML version deleted]]
>> >
>> > ______________________________________________
>> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> > https://stat.ethz.ch/mailman/listinfo/r-help
>> > PLEASE do read the posting guide http://www.R-project.org/
>> posting-guide.html
>> > and provide commented, minimal, self-contained, reproducible code.
>>
>>
>
>
> --
> 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
> science."
>
>                               -Robert Gentleman
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> 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