Re: [R] Last char of a string in a list -> list of strings

2009-03-18 Thread Fredrik Karlsson
Dear Gabor, Thank you very much for this very helpful suggestion. Indeed, I was making it too complicated by spliting the string into a vector. Thank you! /Fredrik On Wed, Mar 18, 2009 at 3:37 PM, Gabor Grothendieck wrote: > Try this: > >> L <- c("!H*L", "L%", "%L", "H*L", "L%", "%L", "H*L", "

Re: [R] Last char of a string in a list -> list of strings

2009-03-18 Thread Gabor Grothendieck
Try this: > L <- c("!H*L", "L%", "%L", "H*L", "L%", "%L", "H*L", "H*L", "L%", + "%L", "H*L", "!H*L", "L%", "%L", "%L", "%L", "%L", "H*L", "!H*L", + "L%", "H*", "%L", "H*L", "L_%", "%L", "%H", "%H", "!H*L", "%H", + "H*", "%H", "%H", "H%", "H*", "!H*L", "H*L", "!H*L", "H*", "H*L", + "L_%", "%L", "%L