| To: | <s-news@lists.biostat.wustl.edu> |
|---|---|
| Subject: | replacement of character in column by values |
| From: | "El Imam Hanan Attia Rizk" <hanan.elimam@umontreal.ca> |
| Date: | Tue, 30 Oct 2007 16:36:22 -0400 |
| Thread-index: | AcgbNIixuvzJfBEgRh6UI/iXCmdHUw== |
| Thread-topic: | replacement of character in column by values |
Dear S Plus user I am working in a big data, I have two data frames that I did bind by rows (rbind) and I gut these columns(A,B,C,D) A B C D 0 0 0 0 NA NA NA NA NA NA NA NA 0 0 0 0 1 1 0 1 NA NA NA NA 1 1 0 1 I would like to go through each column and replace NA by 0 if it is between 2 zeros, and if it is between two ones replace it by 1 I would really appreciate if any of you have the chance to give me some suggestions. Hanan Elimam Ph.D student, Pharmaceutical Sciences Université de Montréal Faculté de pharmacie Pavillon Jean-Coutu, bureau 3173 2940 Chemin de la polytechnique Montréal, H3T 1J4 tél.: 514-343-6111, poste 0388 FAX: 514-343-7073 |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: lme for count data?, Michael O'Connell |
|---|---|
| Next by Date: | Re: replacement of character in column by values, Rhoderick Machekano |
| Previous by Thread: | Subscript in graphic label, Tristan Lorino |
| Next by Thread: | Re: replacement of character in column by values, Rhoderick Machekano |
| Indexes: | [Date] [Thread] [Top] [All Lists] |