[R] Thanks
Gabor Grothendieck
ggrothendieck at myway.com
Wed Sep 8 05:13:24 CEST 2004
å欣 <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"
More information about the R-help
mailing list