Calculate Response Efficiency

Can you turn this into a proper reproducible example by including sample data on a copy/paste friendly format?