gt;>
>> ** **
>>
>> Bill Dunlap****
>>
>> Spotfire, TIBCO Software
>>
>> wdunlap tibco.com
>>
>> ** **
>>
>> *From:* Ben quant [mailto:ccqu...@gmail.com]
>> *Sent:* Friday, June 08, 2012 11:40 AM
>> *To:* Willi
t [mailto:ccqu...@gmail.com]
> *Sent:* Friday, June 08, 2012 11:40 AM
> *To:* William Dunlap
>
> *Cc:* r-help@r-project.org
> *Subject:* Re: [R] remove leading slash
>
> ** **
>
> Okay, Bill smelt something wrong, so I must revise.
>
> This works for large num
ill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
From: Ben quant [mailto:ccqu...@gmail.com]
Sent: Friday, June 08, 2012 11:40 AM
To: William Dunlap
Cc: r-help@r-project.org
Subject: Re: [R] remove leading slash
Okay, Bill smelt something wrong, so I must revise.
This works for large numb
bco.com
>
>
> > -Original Message-
> > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf
> > Of Ben quant
> > Sent: Friday, June 08, 2012 11:00 AM
> > To: Duncan Murdoch
> > Cc: r-help@r-project.org
> > S
..@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf
> Of Ben quant
> Sent: Friday, June 08, 2012 11:00 AM
> To: Duncan Murdoch
> Cc: r-help@r-project.org
> Subject: Re: [R] remove leading slash
>
> Thanks for all your help. I did it this way:
>
> >
Thanks for all your help. I did it this way:
> x = sapply(cnt_str,deparse)
> x
\002\001\002
"\"\\002\"" "\"\\001\"" "\"\\102\""
> as.numeric(substr(x,3,5))
[1] 2 1 102
...which is a bit of a hack, but gets me where I want to go.
Thanks,
Ben
On Fri, Jun 8, 2012 at 11:
On 08/06/2012 1:50 PM, Peter Langfelder wrote:
On Fri, Jun 8, 2012 at 10:25 AM, David Winsemius wrote:
>
> On Jun 8, 2012, at 1:11 PM, Ben quant wrote:
>
>> Hello,
>>
>> How do I change this:
>>>
>>> cnt_str
>>
>> [1] "\002" "\001" "\102"
>>
>> ...to this:
>>>
>>> cnt_str
>>
>> [1] "2" "
On Jun 8, 2012, at 19:25 , David Winsemius wrote:
>
> On Jun 8, 2012, at 1:11 PM, Ben quant wrote:
>
>> Hello,
>>
>> How do I change this:
>>> cnt_str
>> [1] "\002" "\001" "\102"
>>
>> ...to this:
>>> cnt_str
>> [1] "2" "1" "102"
>>
>> Having trouble because of this:
>>> nchar(cnt_str[1])
>>
On Fri, Jun 8, 2012 at 10:25 AM, David Winsemius wrote:
>
> On Jun 8, 2012, at 1:11 PM, Ben quant wrote:
>
>> Hello,
>>
>> How do I change this:
>>>
>>> cnt_str
>>
>> [1] "\002" "\001" "\102"
>>
>> ...to this:
>>>
>>> cnt_str
>>
>> [1] "2" "1" "102"
>>
>> Having trouble because of this:
>>>
>>> nc
On Jun 8, 2012, at 1:11 PM, Ben quant wrote:
Hello,
How do I change this:
cnt_str
[1] "\002" "\001" "\102"
...to this:
cnt_str
[1] "2" "1" "102"
Having trouble because of this:
nchar(cnt_str[1])
[1] 1
"\001" is ASCII cntrl-A, a single character.
?Quotes # not the first, second or
Hello,
How do I change this:
> cnt_str
[1] "\002" "\001" "\102"
...to this:
> cnt_str
[1] "2" "1" "102"
Having trouble because of this:
> nchar(cnt_str[1])
[1] 1
Thanks!
Ben
[[alternative HTML version deleted]]
__
R-help@r-project.org maili
11 matches
Mail list logo