[R] Substring and strsplit
Thomas Lumley
tlumley at u.washington.edu
Wed Aug 30 00:29:50 CEST 2006
On Tue, 29 Aug 2006, Erin Hodgess wrote:
> Dear R People:
>
> I am trying to split a character vector into a set of individual
> letters:
>
> Ideal:
> x3 <- c("dog")
> "d" "o" "g"
>
> I tried the following:
>> strsplit(x3)
> Error in strsplit(x3) : argument "split" is missing, with no default
>> strsplit(x3,1)
> [[1]]
> [1] "dog"
>
> I know that this is incredibly simple, but what am I doing wrong?
>
This is the first example on the help page for strsplit.
-thomas
More information about the R-help
mailing list