Update fun.R

code change proposal
should psp be declared inside function? 
@michbur: not necesselary, just move it out
@michbur: exchange spline by savgol? Benefit is questionable (equidistant problems ...).
Merge pull request #16 from devSJR/patch-16

Update fun.R