basically working for removing if(TRUE/FALSE) but not general for structure returned
cleaned up the structure  of the expressions for the if removal
cleaned up the structure  of the expressions for the if removal
handle the if() else if, i.e. sequence of if statements
comments
documentation and updates for being an installable package
passes R CMD check