Update functions2.R

correct a mistake