[R] Diff'ing 2 strings

Sebastien Bihorel @eb@@tien@bihorel @ending from cognigencorp@com
Thu Jan 10 18:18:48 CET 2019


Thanks for the clarification.

----- Original Message -----
From: "Duncan Murdoch" <murdoch.duncan using gmail.com>
To: "Sebastien Bihorel" <sebastien.bihorel using cognigencorp.com>, "Jeff Newmiller" <jdnewmil using dcn.davis.ca.us>
Cc: r-help using r-project.org
Sent: Thursday, January 10, 2019 11:43:14 AM
Subject: Re: [R] Diff'ing 2 strings

On 10/01/2019 11:38 a.m., Sebastien Bihorel wrote:
> Yep, I did. Got nothing. It does not come with R 3.4.3, which is the version I can use.
> 
> R CMD Rdiff comes with this version, but it is a shell command not a R function. It is meant for diff'ing R output.

It's in the tools package, so ?tools::Rdiff should get what you want 
even in that version.  But as you note, it isn't a general purpose diff 
for character vectors, it is targeted at comparing R output files.

Duncan Murdoch

> 
> 
> ----- Original Message -----
> From: "Jeff Newmiller" <jdnewmil using dcn.davis.ca.us>
> To: r-help using r-project.org, "Sebastien Bihorel" <sebastien.bihorel using cognigencorp.com>, "Martin Møller Skarbiniks Pedersen" <traxplayer using gmail.com>
> Cc: "R mailing list" <r-help using r-project.org>
> Sent: Thursday, January 10, 2019 10:49:15 AM
> Subject: Re: [R] Diff'ing 2 strings
> 
> Just type
> 
> ?Rdiff
> 
> it is in the preinstalled packages that come with R.
> 
> On January 10, 2019 7:35:42 AM PST, Sebastien Bihorel <sebastien.bihorel using cognigencorp.com> wrote:
>>From which the diffobj package? 
>>
>>
>> From: "Martin Møller Skarbiniks Pedersen" <traxplayer using gmail.com>
>> To: "Sebastien Bihorel" <sebastien.bihorel using cognigencorp.com>
>> Cc: "R mailing list" <r-help using r-project.org>
>> Sent: Thursday, January 10, 2019 2:35:15 AM
>> Subject: Re: [R] Diff'ing 2 strings
>>
>>
>>
>> On Sat, Jan 5, 2019, 14:58 Sebastien Bihorel < [
>> mailto:sebastien.bihorel using cognigencorp.com |
>> sebastien.bihorel using cognigencorp.com ] wrote:
>>
>>
>> Hi,
>>
>> Does R include an equivalent of the linux diff command?
>>
>>
>>
>>
>> yes.
>> ?rdiff
>>
>> /martin
>>
>>
>> 	[[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help using 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