On 12/21/2005 5:13 PM, Roger D. Peng wrote:
> Well, who am I to break this long-standing ritual? :)
>
> Interestingly, while the printed output looks wrong, I get
>
> > v <- paste(0:10, "asdf", sep = ".")
> > a <- sub(".asdf", "", v, fixed = TRUE)
> > b <- as.character(0:10)
> > identical(a,
On Wed, 21 Dec 2005, Roger D. Peng wrote:
> Well, who am I to break this long-standing ritual? :)
>
> Interestingly, while the printed output looks wrong, I get
>
> > v <- paste(0:10, "asdf", sep = ".")
> > a <- sub(".asdf", "", v, fixed = TRUE)
> > b <- as.character(0:10)
> > identical(a, b)
> [1
Well, who am I to break this long-standing ritual? :)
Interestingly, while the printed output looks wrong, I get
> v <- paste(0:10, "asdf", sep = ".")
> a <- sub(".asdf", "", v, fixed = TRUE)
> b <- as.character(0:10)
> identical(a, b)
[1] TRUE
>
-roger
Peter Dalgaard wrote:
> "Roger D. Pe
"Roger D. Peng" <[EMAIL PROTECTED]> writes:
> I've noticed what I think is curious behavior in using 'sub(fixed = TRUE)'
> and
> was wondering if my expectation is incorrect. Here is one example:
>
> v <- paste(0:10, "asdf", sep = ".")
> sub(".asdf", "", v, fixed = TRUE)
>
> The results I get
I've noticed what I think is curious behavior in using 'sub(fixed = TRUE)' and
was wondering if my expectation is incorrect. Here is one example:
v <- paste(0:10, "asdf", sep = ".")
sub(".asdf", "", v, fixed = TRUE)
The results I get are
> sub(".asdf", "", v, fixed = TRUE)
[1] "0"