sdanzige wrote:
sdanzige wrote:
Thank you, but the regular expression example doesn't seem to work
correctly.
I wrote a regular expression that does seem to work, so I'll post it here
for anyone else that needs it.
labs<-levels(df$p_bin)
cbind(lower=as.numeric(sub("[[(]","",sub(",.*","",l
sdanzige wrote:
>
>
> Thank you, but the regular expression example doesn't seem to work
> correctly.
>
>
I wrote a regular expression that does seem to work, so I'll post it here
for anyone else that needs it.
labs<-levels(df$p_bin)
cbind(lower=as.numeric(sub("[[(]","",sub(",.*","",labs)))
Dieter Menne wrote:
>
>
> It used to be quite tricky, but on popular request Brian Ripley has added
> an example how to extract the intervals using regular expression on the
> bottom of the examples for cut (note:cut in base, not cut2 in Hmisc).
>
>
Thank you, but the regular expression exa
On Fri, Oct 23, 2009 at 3:58 AM, Dieter Menne
wrote:
>
>
>
> sdanzige wrote:
>>
>>
>> I'm using the Hmisc cut2 function to bin a set of data. It produces bins
>> that I like with results like this:
>>
>> [96,270]:171
>> [69, 96): 54
>> [49, 69): 40
>> [35, 49): 28
>> [28, 35): 14
>> [24, 28): 8
sdanzige wrote:
>
>
> I'm using the Hmisc cut2 function to bin a set of data. It produces bins
> that I like with results like this:
>
> [96,270]:171
> [69, 96): 54
> [49, 69): 40
> [35, 49): 28
> [28, 35): 14
> [24, 28): 8
> (Other) : 48
>
> I would like to take a second set of data, and
Hello,
I'm using the Hmisc cut2 function to bin a set of data. It produces bins
that I like with results like this:
[96,270]:171
[69, 96): 54
[49, 69): 40
[35, 49): 28
[28, 35): 14
[24, 28): 8
(Other) : 48
I would like to take a second set of data, and assign it to bins based on
factors defin
6 matches
Mail list logo