Try this:

Reduce(union, strsplit(gsub("([A-Z])", ";\\1", a), ";"))

On Wed, Nov 17, 2010 at 5:59 PM, johannes rara <johannesr...@gmail.com>wrote:

> I have a vector like this:
>
> a <- c("thisIsName", "thisIsAlsoName", "andThisName")
>
> How to break this into pieces and produce a vector with unique parts:
>
> this
> Is
> Name
> Also
> and
> This
>
> -J
>
> ______________________________________________
> R-help@r-project.org mailing list
> 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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to