Skip to content
Prev 179211 / 398506 Next

help_if command_new column

You should be looking at the ifelse function. Ihe if and else  
constructs are not appropriate for recoding because they do not return  
vectors.

Much easier than all that folderol would be:

df$Aggregation <- ifelse( df$Number>1, "School", "Solitary")
On May 4, 2009, at 12:31 PM, barbara horta e costa wrote:

            
David Winsemius, MD
Heritage Laboratories
West Hartford, CT