Displaying 2 results from an estimated 2 matches for "awdef".
Did you mean:
hwdef
2001 Sep 07
2
Why does substr<- truncate and not replace...
...ing, then only the portion the length of the string is
replaced.
And so I try:
R> x <- "abcdef"
R> substr(x,2,3) <- "xy" #ok
R> x
[1] "axydef"
R> substr(x,2,3) <- "w" #ko
R> x
[1] "aw"
hmm, I would have expected "awdef". Am I reading the docs wrong? (Or
am I just blinded to expect this string because that's what Perl would do?)
Thanks!
-tom
--
mailto:tov at ece.cmu.edu (Tom Vogels) Tel: (412) 268-6638 FAX: -3204
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-...
2001 Sep 07
2
Why does substr<- truncate and not replace...
...ing, then only the portion the length of the string is
replaced.
And so I try:
R> x <- "abcdef"
R> substr(x,2,3) <- "xy" #ok
R> x
[1] "axydef"
R> substr(x,2,3) <- "w" #ko
R> x
[1] "aw"
hmm, I would have expected "awdef". Am I reading the docs wrong? (Or
am I just blinded to expect this string because that's what Perl would do?)
Thanks!
-tom
--
mailto:tov at ece.cmu.edu (Tom Vogels) Tel: (412) 268-6638 FAX: -3204
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-...