See ?substr and ?nchar
Try:
substr(Hello World, 0, nchar(Hello World)-2)
Regards
Markus Gesmann
FPMA
Lloyd's Market Analysis
Lloyd's * One Lime Street * London * EC3M 7HA
Telephone +44 (0)20 7327 6472
Facsimile +44 (0)20 7327 5718
http://www.lloyds.com
-Original Message-
From: [EMAIL
A . (dot) matches any character and $ matches the end of string so
this replaces the last two characters with the empty string:
sub(..$, , x)
On 7/24/06, Wade Wall [EMAIL PROTECTED] wrote:
Hi all,
I am looking for a function in R to trim the last two characters of an
8 character string in