| To: | carol white <wht_crl@yahoo.com> |
|---|---|
| Subject: | Re: switch keyword |
| From: | David L Lorenz <lorenz@usgs.gov> |
| Date: | Tue, 9 Oct 2007 12:48:15 -0500 |
| Cc: | s-news@lists.biostat.wustl.edu, s-news-owner@lists.biostat.wustl.edu |
| In-reply-to: | <357352.46088.qm@web62003.mail.re1.yahoo.com> |
|
Carol, Take a look at the cut() function. Dave
Hi, I have an integer vector that I want to convert to a categorical vector with values 1, 2, 3. If the value of an element of the integer vector < 20, then, the value of the corresponding element in the categorical vector will be 1 if the value of an element of the integer vector > 20 and < 50, then, the value of the corresponding element in the categorical vector will be 2 if the value of an element of the integer vector > 50, then, the value of the corresponding element in the categorical vector will be 3 can I do this by switch and how look forward to your feedback carol
Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more!
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: switch keyword, Padhye, Nikhil S |
|---|---|
| Next by Date: | Histograms/Density/Quantile plots, Santosh |
| Previous by Thread: | Re: switch keyword, Padhye, Nikhil S |
| Next by Thread: | Réf. : switch keyword, gerald . jean |
| Indexes: | [Date] [Thread] [Top] [All Lists] |