Skip to content
Back to formatted view

Raw Message

Message-ID: <20051031165200.45mwdufla4o4g4ww@webmail.datanalytics.com>
Date: 2005-10-31T15:52:00Z
From: Carlos J. Gil Bellosta
Subject: getting last 2 charcters of a string, other "text"	functions?
In-Reply-To: <20051031153755.80990.qmail@web35006.mail.mud.yahoo.com>

gsub(".*(..)$", "\\1", "i only want the last two characters")

This is only a matter of finding the right regular expression. Use Google to
find a good tutorial on them.

Carlos J. Gil Bellosta
http://www.datanalytics.com


Quoting t c <quantpm at yahoo.com>:

> I wish to obtain the right-most n characters of a character string?  
> What is the appropriate function?
>
>
>
> ---------------------------------
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>