Gabor Grothendieck <ggrothendieck <at> myway.com> writes: : : åæ <xmeng <at> capitalbio.com> writes: : : : Thanks a lot for your timely rely. : : I still wonder whether I can use "a":"d" instead of 1:4. : : I remember I fulfill it successfully according to the guidance of some : materials on R,but fail to find it now. : : You could define your own seq function and operator: : : R> "%:%" <- seq.character <- function(x,y) letters[letters >= x & letters <= y] : R> seq("a", "d") : [1] "a" "b" "c" "d" : R> "a" %:% "d" : [1] "a" "b" "c" "d"
And just as a follow up to my own post, if you want to make this a bit more general you might use ascii in place of letters where ascii is defined in: http://www.r-project.org/nocvs/mail/r-help/2002/0952.html ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html