Re: [R] Assigning a variable value based on multiple columns

2013-04-25 Thread Jason Stout, M.D.
-help@r-project.org Subject: Re: [R] Assigning a variable value based on multiple columns Hi Jason, I think that the easiest for you would be to keep your current elseif statements as is, but change your NA into something else (e.g., -999, or anything else). To do this in one line, you can use the

Re: [R] Assigning a variable value based on multiple columns

2013-04-24 Thread Patrick Coulombe
Hi Jason, I think that the easiest for you would be to keep your current elseif statements as is, but change your NA into something else (e.g., -999, or anything else). To do this in one line, you can use the package "gdata". In this code, I assume that your data are stored in the variable "datas

[R] Assigning a variable value based on multiple columns

2013-04-24 Thread Jason Stout, M.D.
Hi All, I'm hoping someone can help me with a relatively simple problem. Take the following dataset: IDDiabetesESRDHIVContact 100NA0 210NA0 3NA 100 40