how to split one word into letters
7
0
Entering edit mode
Liu, Xin ▴ 130
@liu-xin-909
Last seen 10.2 years ago
Dear all, Somebody knows how to split one word into letters? Such as split "alabama" into letters "a", "l", "a","b","a","m","a". Cheers! Xin This e-mail is from ArraDx Ltd The e-mail and any files transmitted with it are confidentia...{{dropped}}
• 1.6k views
ADD COMMENT
0
Entering edit mode
Jeff Gentry ★ 3.9k
@jeff-gentry-12
Last seen 10.2 years ago
> Somebody knows how to split one word into letters? Such as split > "alabama" into letters "a", "l", "a","b","a","m","a". strsplit("alabama", "")
ADD COMMENT
0
Entering edit mode
Liaw, Andy ▴ 360
@liaw-andy-125
Last seen 10.2 years ago
strsplit() is your friend: > strsplit("alabama", "")[[1]] [1] "a" "l" "a" "b" "a" "m" "a" Cheers, Andy > From: Liu, Xin > > Dear all, > > Somebody knows how to split one word into letters? Such as > split "alabama" into letters "a", "l", "a","b","a","m","a". > > Cheers! > Xin > > This e-mail is from ArraDx Ltd > > The e-mail and any files transmitted with it are > confidentia...{{dropped}} > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > >
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 19 hours ago
United States
Liu, Xin wrote: > Dear all, > > Somebody knows how to split one word into letters? Such as split "alabama" into letters "a", "l", "a","b","a","m","a". strsplit("alabama", NULL) > > Cheers! > Xin > > This e-mail is from ArraDx Ltd > > The e-mail and any files transmitted with it are confidentia...{{dropped}} > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor -- James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109
ADD COMMENT
0
Entering edit mode
Fangxin Hong ▴ 810
@fangxin-hong-912
Last seen 10.2 years ago
unlist(strsplit("alabama","")) > Dear all, > > Somebody knows how to split one word into letters? Such as split "alabama" > into letters "a", "l", "a","b","a","m","a". > > Cheers! > Xin > > This e-mail is from ArraDx Ltd > > The e-mail and any files transmitted with it are confidentia...{{dropped}} > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > > -- Fangxin Hong, Ph.D. Plant Biology Laboratory The Salk Institute 10010 N. Torrey Pines Rd. La Jolla, CA 92037 E-mail: fhong@salk.edu
ADD COMMENT
0
Entering edit mode
Wenbin Liu ▴ 100
@wenbin-liu-943
Last seen 10.2 years ago
Have you tried substring()? The method i can think of now is to get the length of the string (word) by nchar(), and then loop through by substring(). There may be smarter methods out there that I haven't realized. Wenbin --- "Liu, Xin" <xin.liu@arradx.com> wrote: > Dear all, > > Somebody knows how to split one word into letters? > Such as split "alabama" into letters "a", "l", > "a","b","a","m","a". > > Cheers! > Xin > > This e-mail is from ArraDx Ltd > > The e-mail and any files transmitted with it are > confidentia...{{dropped}} > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > __________________________________ Meet the all-new My Yahoo! - Try it today!
ADD COMMENT
0
Entering edit mode
@huntsinger-reid-221
Last seen 10.2 years ago
strsplit(word,split="") will do this. Reid Huntsinger -----Original Message----- From: bioconductor-bounces@stat.math.ethz.ch [mailto:bioconductor-bounces@stat.math.ethz.ch] On Behalf Of Wenbin Liu Sent: Wednesday, November 17, 2004 10:44 AM To: Liu, Xin; bioconductor@stat.math.ethz.ch Subject: Re: [BioC] how to split one word into letters Have you tried substring()? The method i can think of now is to get the length of the string (word) by nchar(), and then loop through by substring(). There may be smarter methods out there that I haven't realized. Wenbin --- "Liu, Xin" <xin.liu@arradx.com> wrote: > Dear all, > > Somebody knows how to split one word into letters? > Such as split "alabama" into letters "a", "l", > "a","b","a","m","a". > > Cheers! > Xin > > This e-mail is from ArraDx Ltd > > The e-mail and any files transmitted with it are > confidentia...{{dropped}} > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > __________________________________ Meet the all-new My Yahoo! - Try it today! _______________________________________________ Bioconductor mailing list Bioconductor@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
John Zhang ★ 2.9k
@john-zhang-6
Last seen 10.2 years ago
>Have you tried substring()? The method i can think of >now is to get the length of the string (word) by >nchar(), and then loop through by substring(). There >may be smarter methods out there that I haven't >realized. How about >substring("abcdef",1:6,1:6) [1] "a" "b" "c" "d" "e" "f" > >Wenbin > > >--- "Liu, Xin" <xin.liu@arradx.com> wrote: > >> Dear all, >> >> Somebody knows how to split one word into letters? >> Such as split "alabama" into letters "a", "l", >> "a","b","a","m","a". >> >> Cheers! >> Xin >> >> This e-mail is from ArraDx Ltd >> >> The e-mail and any files transmitted with it are >> confidentia...{{dropped}} >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor@stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> > > > > >__________________________________ > >Meet the all-new My Yahoo! - Try it today! > >_______________________________________________ >Bioconductor mailing list >Bioconductor@stat.math.ethz.ch >https://stat.ethz.ch/mailman/listinfo/bioconductor Jianhua Zhang Department of Biostatistics Dana-Farber Cancer Institute 44 Binney Street Boston, MA 02115-6084
ADD COMMENT

Login before adding your answer.

Traffic: 548 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6