Add function.R

first Draft