Skip to content

conditional replacement of character strings in vectors

6 messages · David Winsemius, R. Michael Weylandt, Josh Tewksbury

#
On Sep 2, 2011, at 3:51 PM, Josh Tewksbury wrote:

            
Mangled data but no matter:

dfrm$b[is.na(dfrm$b)] <- dfrm$a[is.na(dfrm$b)]

(Learn to post in plain text. This is a plain text list.)


David Winsemius, MD
West Hartford, CT
#
On Sep 2, 2011, at 7:51 PM, R. Michael Weylandt wrote:

            
One of the rare instances where I disagree with Michael. The row index  
on the right hand side must be the same as the row index on the left  
hand side.
Right, that is the idea.
David Winsemius, MD
West Hartford, CT
1 day later