filterData function

This function is used to filter data in shinys that inputs are defined following.