On Feb 6, 2013, at 11:24 AM, David Winsemius wrote:
>
> On Feb 6, 2013, at 8:46 AM, Christofer Bogaso wrote:
>
>> Hello again,
>>
>> I was looking for some way on How to delete repeated appearance in a
>> String. Let say I have following string:
>>
>> Text <- "ahsgdvasgAbcabcsdahj"
>>
>> Her
Hi Christopher,
what is the rule to omit "ah" which is also repeated in Text?
The following might be a start:
Text <- "ahsgdvasgAbcabcsdahj"
#finds first repetion of substrings of length 2 or more, here "ah"
gsub("(?i)([a-z]{2,})(.*)\\1","\\1\\2",Text,perl=T)
#finds all repetions of substrings of
On Feb 6, 2013, at 8:46 AM, Christofer Bogaso wrote:
> Hello again,
>
> I was looking for some way on How to delete repeated appearance in a
> String. Let say I have following string:
>
> Text <- "ahsgdvasgAbcabcsdahj"
>
> Here you see "Abc" appears twice. But I want to keep only 1
> occurrenc
Hello again,
I was looking for some way on How to delete repeated appearance in a
String. Let say I have following string:
Text <- "ahsgdvasgAbcabcsdahj"
Here you see "Abc" appears twice. But I want to keep only 1
occurrence. Therefore I need that:
Text_result <- "ahsgdvasgAbcsdahj" (i.e. the f
4 matches
Mail list logo