Skip to content

spliting a word into letters

3 messages · mirauta, Remko Duursma, Bert Gunter

#
Hello,
Is there any function to split a word into letters?
(eg: "AAACC" into "A","A","A","A""C","C" )
I need to load some ADN sequences and ussualy these are writen in words
without spaces between letters.

Thanks,
Bogdan
#
strsplit("hello","")[[1]]



r



-------------------------------------------------
Remko Duursma
Post-Doctoral Fellow

Centre for Plants and the Environment
University of Western Sydney
Hawkesbury Campus
Richmond NSW 2753

Dept of Biological Science
Macquarie University
North Ryde NSW 2109
Australia

Mobile: +61 (0)422 096908
www.remkoduursma.com
On Thu, Nov 5, 2009 at 8:07 AM, mirauta <bmirauta at yahoo.com> wrote:
#
?strsplit

e.g. strsplit(vectorofstrings,split="")

Bert Gunter
Genentech Nonclinical Biostatistics
 
 

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of mirauta
Sent: Wednesday, November 04, 2009 1:07 PM
To: r-help at r-project.org
Subject: [R] spliting a word into letters


Hello,
Is there any function to split a word into letters?
(eg: "AAACC" into "A","A","A","A""C","C" )
I need to load some ADN sequences and ussualy these are writen in words
without spaces between letters.

Thanks,
Bogdan