Re: [R] Create a categorical variable using the deciles of data

2022-06-15 Thread Richard O'Keefe
fe > Sent: Tuesday, June 14, 2022 9:08 AM > To: anteneh asmare > Cc: R Project Help > Subject: Re: [R] Create a categorical variable using the deciles of data > > [External Email] > > Can you explain why you are not using > ?quantile > to find the deciles then > ?cu

Re: [R] Create a categorical variable using the deciles of data

2022-06-14 Thread Ebert,Timothy Aaron
Hana, the "right" answer depends on exactly what you need. Here are three correct solutions. They use the same basic strategy to give different results. There are also other approaches in R to get the same outcome. You could use data_catigocal[i,j] and some for loops. size1 <-5 ngroup <- 1