[R] Q. About String indexing

Ben Day day at programmer.net
Fri Nov 7 02:53:39 CET 2003

Hi all - this is a very basic question: how does one index substrings of a character string, for example get the 2nd through 5th characters of the string "testing", in the R language? Indexing with square brackets seems only to work for vectors, lists, etc., and although I've found plenty of functions for concatenating strings, running substitutions with regexps and the like, I seem to be at a loss when it comes to indexing or selecting substrings.

I'm sure I'm missing something very obvious here, but I ask only after having scoured the basic help manuals.

I am not so subscribed to this list, so if any replies could be sent directly to me.

Thanks very much,
Sign-up for your own personalized E-mail at Mail.com

Search Smarter - get the new eXact Search Bar for free!

More information about the R-help mailing list