Re: [R] subset a string

2010-03-04 Thread Nick Matzke
thanks!! was stuck in python brain. Simon Blomberg wrote: substr(x,1,3) On Thu, 2010-03-04 at 21:32 -0800, Nick Matzke wrote: Hi, This has got to be easy, but for some reason the simplest things can be the hardest to find help on in R. How the heck do I subset a string? e.g., x = "abcdef

Re: [R] subset a string

2010-03-04 Thread Simon Blomberg
substr(x,1,3) On Thu, 2010-03-04 at 21:32 -0800, Nick Matzke wrote: > Hi, > > This has got to be easy, but for some reason the simplest things can be > the hardest to find help on in R. > > How the heck do I subset a string? > > e.g., > > x = "abcdef" > > I just want the first 3 characters.