alamoboy wrote:
>
> Newbie here. Many apologies in advance for using the incorrect lingo.
> I'm new to statistics and VERY new to R.
>
> I'm attempting to "group" or "bin" data together in order to analyze them
> as a combined group rather than as discrete set. I'll provide a simple
> examp
alamoboy wrote:
>
> Newbie here. Many apologies in advance for using the incorrect lingo.
> I'm new to statistics and VERY new to R.
>
> I'm attempting to "group" or "bin" data together in order to analyze them
> as a combined group rather than as discrete set. I'll provide a simple
> examp
Personally, I prefer the recode() in package of car.
Ronggui
2009/6/4 Philipp Pagel :
>> I'm attempting to "group" or "bin" data together in order to analyze them as
>> a combined group rather than as discrete set. I'll provide a simple example
>> of the data for illustrative purposes.
>>
>> Pat
You want cut and tapply, perhaps along these lines:
## Your data frame:
a <- data.frame(patient=1:6, charges=c(100,500,200,90,400,500),
age=c(0,3,5,7,10,16),
race=c("black","white","hispanic","asian","hispanic","black"))
## Add an age category:
a <- cbind(a, age_category=cut(a$age, breaks=c(-
> I'm attempting to "group" or "bin" data together in order to analyze them as
> a combined group rather than as discrete set. I'll provide a simple example
> of the data for illustrative purposes.
>
> Patient ID | Charges |Age | Race
> 1 | 100 |0 | Bla
Newbie here. Many apologies in advance for using the incorrect lingo. I'm
new to statistics and VERY new to R.
I'm attempting to "group" or "bin" data together in order to analyze them as
a combined group rather than as discrete set. I'll provide a simple example
of the data for illustrative p
6 matches
Mail list logo