Using a checkbox for adding residual to dataframe. Can't get action button to work