Re: [R] calculating quintile values of numeric data?

2019-01-23 Thread David L Carlson
help On Behalf Of Jeff Newmiller Sent: Wednesday, January 23, 2019 1:00 AM To: r-help@r-project.org; Kelly Thompson Subject: Re: [R] calculating quintile values of numeric data? ?range ?findInterval On January 22, 2019 6:54:14 PM PST, Kelly Thompson wrote: >I’d like to take numeric da

Re: [R] calculating quintile values of numeric data? Alexandros Kouretsis

2019-01-23 Thread Alexandros Kouretsis
cut can do the job q_prob <- seq(0, 1, 0.2) cut(x, breaks = quantile(x, probs = q_prob), include.lowest = T , labels = 1:5) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

Re: [R] calculating quintile values of numeric data?

2019-01-22 Thread Jeff Newmiller
?range ?findInterval On January 22, 2019 6:54:14 PM PST, Kelly Thompson wrote: >I’d like to take numeric data, and calculate numeric “quintiles” with >integer values in from 1 – 5 , with values in the lowest 20% of values >having a value of 1, the >20 - <= 40% of values having a value of 2, >the

[R] calculating quintile values of numeric data?

2019-01-22 Thread Kelly Thompson
I’d like to take numeric data, and calculate numeric “quintiles” with integer values in from 1 – 5 , with values in the lowest 20% of values having a value of 1, the >20 - <= 40% of values having a value of 2, the >40% - <=60% of values having a value of 3, etc. How can I use quantcut, or another